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
854bd537
Unverified
Commit
854bd537
authored
Jun 19, 2020
by
Aline Tenório
Committed by
GitHub
Jun 19, 2020
Browse files
Merge pull request #30 from lmts-ufape/submissaoParcial
Submissao parcial
parents
72241b3c
36ff9516
Changes
24
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/EventoController.php
View file @
854bd537
...
...
@@ -80,8 +80,11 @@ class EventoController extends Controller
$user_id
=
Auth
()
->
user
()
->
id
;
//dd($user_id);
// validar datas nulas antes, pois pode gerar um bug
//--Salvando os anexos da submissão temporariamente
$evento
=
$this
->
armazenarAnexosTemp
(
$request
);
// validar datas nulas antes, pois pode gerar um bug
if
(
$request
->
inicioSubmissao
==
null
||
$request
->
fimSubmissao
==
null
||
...
...
@@ -94,13 +97,15 @@ class EventoController extends Controller
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'natureza'
=>
[
'required'
],
'descricao'
=>
[
'required'
],
'coordenador_id'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
],
'fimSubmissao'
=>
[
'required'
,
'date'
],
'inicioRevisao'
=>
[
'required'
,
'date'
],
'fimRevisao'
=>
[
'required'
,
'date'
],
'resultado'
=>
[
'required'
,
'date'
],
'pdfEdital'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'pdfEdital'
=>
[
(
$request
->
pdfEditalPreenchido
!==
'sim'
?
'required'
:
''
)
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2000000'
],
]);
}
...
...
@@ -112,28 +117,31 @@ class EventoController extends Controller
'descricao'
=>
[
'required'
,
'string'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'descricao'
=>
[
'required'
],
'coordenador_id'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after:'
.
$request
->
inicioSubmissao
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'fimRevisao'
=>
[
'required'
,
'date'
,
'after:'
.
$request
->
inicioRevisao
],
'resultado'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'pdfEdital'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'pdfEdital'
=>
[
(
$request
->
pdfEditalPreenchido
!==
'sim'
?
'required'
:
''
)
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2000000'
],
]);
$evento
=
Evento
::
create
([
'nome'
=>
$request
->
nome
,
'descricao'
=>
$request
->
descricao
,
'tipo'
=>
$request
->
tipo
,
'natureza_id'
=>
$request
->
natureza
,
'inicioSubmissao'
=>
$request
->
inicioSubmissao
,
'fimSubmissao'
=>
$request
->
fimSubmissao
,
'inicioRevisao'
=>
$request
->
inicioRevisao
,
'fimRevisao'
=>
$request
->
fimRevisao
,
'resultado'
=>
$request
->
resultado
,
'coordenadorId'
=>
$request
->
coordenador_id
,
'criador_id'
=>
$user_id
,
]);
//$evento = Evento::create([
$evento
[
'nome'
]
=
$request
->
nome
;
$evento
[
'descricao'
]
=
$request
->
descricao
;
$evento
[
'tipo'
]
=
$request
->
tipo
;
$evento
[
'natureza_id'
]
=
$request
->
natureza
;
$evento
[
'inicioSubmissao'
]
=
$request
->
inicioSubmissao
;
$evento
[
'fimSubmissao'
]
=
$request
->
fimSubmissao
;
$evento
[
'inicioRevisao'
]
=
$request
->
inicioRevisao
;
$evento
[
'fimRevisao'
]
=
$request
->
fimRevisao
;
$evento
[
'resultado'
]
=
$request
->
resultado
;
$evento
[
'coordenadorId'
]
=
$request
->
coordenador_id
;
$evento
[
'criador_id'
]
=
$user_id
;
$evento
[
'anexosStatus'
]
=
'final'
;
//dd($evento);
// $user = User::find($request->coordenador_id);
// $user->coordenadorComissao()->editais()->save($evento);
...
...
@@ -147,12 +155,16 @@ class EventoController extends Controller
//$evento->coordenadorId = Auth::user()->id;
$pdfEdital
=
$request
->
pdfEdital
;
$path
=
'pdfEdital/'
.
$evento
->
id
.
'/'
;
$nome
=
"edital.pdf"
;
Storage
::
putFileAs
(
$path
,
$pdfEdital
,
$nome
);
$evento
->
pdfEdital
=
$path
.
$nome
;
//-- Salvando anexos finais
if
(
isset
(
$request
->
pdfEdital
)){
$pdfEdital
=
$request
->
pdfEdital
;
$path
=
'pdfEdital/'
.
$evento
->
id
.
'/'
;
$nome
=
"edital.pdf"
;
Storage
::
putFileAs
(
$path
,
$pdfEdital
,
$nome
);
$evento
->
pdfEdital
=
$path
.
$nome
;
}
if
(
isset
(
$request
->
modeloDocumento
)){
$modeloDocumento
=
$request
->
modeloDocumento
;
$extension
=
$modeloDocumento
->
extension
();
...
...
@@ -163,9 +175,7 @@ class EventoController extends Controller
$evento
->
modeloDocumento
=
$path
.
$nome
;
}
$evento
->
save
();
$evento
->
update
();
// $user = Auth::user();
// $subject = "Evento Criado";
...
...
@@ -175,6 +185,35 @@ class EventoController extends Controller
return
redirect
()
->
route
(
'coord.home'
);
}
public
function
armazenarAnexosTemp
(
Request
$request
){
//---Anexos do Projeto
$eventoTemp
=
Evento
::
where
(
'criador_id'
,
Auth
::
user
()
->
id
)
->
where
(
'anexosStatus'
,
'temporario'
)
->
orderByDesc
(
'updated_at'
)
->
first
();
if
(
$eventoTemp
==
null
){
$eventoTemp
=
new
Evento
();
$eventoTemp
->
criador_id
=
Auth
::
user
()
->
id
;
$eventoTemp
->
anexosStatus
=
'temporario'
;
$eventoTemp
->
save
();
}
if
(
!
(
is_null
(
$request
->
pdfEdital
))
)
{
$pasta
=
'pdfEdital/'
.
$eventoTemp
->
id
;
$eventoTemp
->
pdfEdital
=
Storage
::
putFileAs
(
$pasta
,
$request
->
pdfEdital
,
'edital.pdf'
);
}
if
(
!
(
is_null
(
$request
->
modeloDocumento
)))
{
$extension
=
$request
->
modeloDocumento
->
extension
();
$path
=
'modeloDocumento/'
.
$eventoTemp
->
id
;
$nome
=
"modelo"
.
"."
.
$extension
;
$eventoTemp
->
modeloDocumento
=
Storage
::
putFileAs
(
$path
,
$request
->
modeloDocumento
,
$nome
);
}
$eventoTemp
->
update
();
return
$eventoTemp
;
}
/**
* Display the specified resource.
*
...
...
@@ -248,8 +287,15 @@ class EventoController extends Controller
public
function
edit
(
$id
)
{
// dd($id);
$evento
=
Evento
::
find
(
$id
);
return
view
(
'evento.editarEvento'
,[
'evento'
=>
$evento
]);
$evento
=
Evento
::
find
(
$id
);
$coordenadors
=
CoordenadorComissao
::
with
(
'user'
)
->
get
();
$naturezas
=
Natureza
::
orderBy
(
'nome'
)
->
get
();
$yesterday
=
Carbon
::
yesterday
(
'America/Recife'
);
$yesterday
=
$yesterday
->
toDateString
();
return
view
(
'evento.editarEvento'
,[
'evento'
=>
$evento
,
'coordenadores'
=>
$coordenadors
,
'naturezas'
=>
$naturezas
,
'ontem'
=>
$yesterday
]);
}
/**
...
...
@@ -263,15 +309,55 @@ class EventoController extends Controller
{
//dd($request);
$evento
=
Evento
::
find
(
$id
);
$yesterday
=
Carbon
::
yesterday
(
'America/Recife'
);
$yesterday
=
$yesterday
->
toDateString
();
if
(
$request
->
inicioSubmissao
==
null
||
$request
->
fimSubmissao
==
null
||
$request
->
inicioRevisao
==
null
||
$request
->
fimRevisao
==
null
||
$request
->
resultado
==
null
){
$validatedData
=
$request
->
validate
([
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
],
'fimSubmissao'
=>
[
'required'
,
'date'
],
'inicioRevisao'
=>
[
'required'
,
'date'
],
'fimRevisao'
=>
[
'required'
,
'date'
],
'resultado'
=>
[
'required'
,
'date'
],
'pdfEdital'
=>
[
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2000000'
],
]);
}
$validated
=
$request
->
validate
([
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after:'
.
$request
->
inicioSubmissao
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'fimRevisao'
=>
[
'required'
,
'date'
,
'after:'
.
$request
->
inicioRevisao
],
'resultado'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'pdfEdital'
=>
[
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2000000'
],
]);
$evento
->
nome
=
$request
->
nome
;
$evento
->
descricao
=
$request
->
descricao
;
$evento
->
tipo
=
$request
->
tipo
;
$evento
->
tipo
=
$request
->
tipo
;
$evento
->
natureza_id
=
$request
->
natureza
;
$evento
->
inicioSubmissao
=
$request
->
inicioSubmissao
;
$evento
->
fimSubmissao
=
$request
->
fimSubmissao
;
$evento
->
inicioRevisao
=
$request
->
inicioRevisao
;
$evento
->
fimRevisao
=
$request
->
fimRevisao
;
$evento
->
resultado
=
$request
->
resultado
;
$evento
->
resultado
=
$request
->
resultado
;
$evento
->
coordenadorId
=
$request
->
coordenador_id
;
if
(
$request
->
pdfEdital
!=
null
){
$pdfEdital
=
$request
->
pdfEdital
;
...
...
@@ -289,7 +375,7 @@ class EventoController extends Controller
$evento
->
modeloDocumento
=
$path
.
$nome
;
}
$evento
->
sav
e
();
$evento
->
updat
e
();
$eventos
=
Evento
::
all
();
return
view
(
'coordenador.home'
,[
'eventos'
=>
$eventos
]);
...
...
@@ -470,6 +556,21 @@ class EventoController extends Controller
public
function
baixarEdital
(
$id
)
{
$evento
=
Evento
::
find
(
$id
);
return
Storage
::
download
(
$evento
->
pdfEdital
);
if
(
Storage
::
disk
()
->
exists
(
$evento
->
pdfEdital
))
{
return
Storage
::
download
(
$evento
->
pdfEdital
);
}
return
abort
(
404
);
}
public
function
baixarModelos
(
$id
)
{
$evento
=
Evento
::
find
(
$id
);
if
(
Storage
::
disk
()
->
exists
(
$evento
->
modeloDocumento
))
{
return
Storage
::
download
(
$evento
->
modeloDocumento
);
}
return
abort
(
404
);
}
}
app/Http/Controllers/ProponenteController.php
View file @
854bd537
...
...
@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Validator;
use
Illuminate\Validation\Rule
;
use
Auth
;
use
App\User
;
use
App\Trabalho
;
use
App\Proponente
;
use
App\Evento
;
...
...
@@ -77,4 +78,12 @@ class ProponenteController extends Controller
}
public
function
projetosDoProponente
()
{
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
first
();
$projetos
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
get
();
return
view
(
'proponente.projetos'
)
->
with
([
'projetos'
=>
$projetos
]);
}
}
app/Http/Controllers/TrabalhoController.php
View file @
854bd537
...
...
@@ -49,12 +49,17 @@ class TrabalhoController extends Controller
if
(
$proponente
==
null
){
return
view
(
'proponente.cadastro'
)
->
with
([
'mensagem'
=>
'Você não possui perfil de Proponente, para submeter algum projeto preencha o formulário.'
]);;
}
$rascunho
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
where
(
'evento_id'
,
$edital
->
id
)
->
where
(
'status'
,
'Rascunho'
)
->
orderByDesc
(
'updated_at'
)
->
first
();
//dd($rascunho);
return
view
(
'evento.submeterTrabalho'
,[
'edital'
=>
$edital
,
'grandeAreas'
=>
$grandeAreas
,
'funcaoParticipantes'
=>
$funcaoParticipantes
'funcaoParticipantes'
=>
$funcaoParticipantes
,
'rascunho'
=>
$rascunho
]);
}
...
...
@@ -94,8 +99,8 @@ class TrabalhoController extends Controller
}
}
//--Salvando os
anex
os da submissão temporariamente
$this
->
armazenar
Anexos
Temp
(
$request
,
Auth
::
user
()
->
id
);
//--Salvando os
dad
os da submissão temporariamente
$trabalho
=
$this
->
armazenar
Info
Temp
(
$request
,
$proponente
);
//O anexo de Decisão do CONSU dependo do tipo de edital
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
){
...
...
@@ -125,28 +130,27 @@ class TrabalhoController extends Controller
]);
//dd($request->all());
$trabalho
=
Trabalho
::
create
([
'titulo'
=>
$request
->
nomeProjeto
,
'coordenador_id'
=>
$coordenador
->
id
,
'grande_area_id'
=>
$request
->
grandeArea
,
'area_id'
=>
$request
->
area
,
'sub_area_id'
=>
$request
->
subArea
,
'pontuacaoPlanilha'
=>
$request
->
pontuacaoPlanilha
,
'linkGrupoPesquisa'
=>
$request
->
linkGrupo
,
'linkLattesEstudante'
=>
$request
->
linkLattesEstudante
,
'data'
=>
$mytime
,
'evento_id'
=>
$request
->
editalId
,
'avaliado'
=>
0
,
'status'
=>
'Submetido'
,
'proponente_id'
=>
$proponente
->
id
,
//Anexos
'anexoCONSU'
=>
$request
->
anexoCONSU
!=
null
?
$request
->
anexoCONSU
:
""
,
'anexoProjeto'
=>
$request
->
anexoProjeto
!=
null
?
$request
->
anexoProjeto
:
""
,
'anexoAutorizacaoComiteEtica'
=>
$request
->
anexoComiteEtica
!=
null
?
$request
->
anexoComiteEtica
:
""
,
'justificativaAutorizacaoEtica'
=>
$request
->
justificativaAutorizacaoEtica
!=
null
?
$request
->
justificativaAutorizacaoEtica
:
""
,
'anexoLattesCoordenador'
=>
$request
->
anexoLattesCoordenador
!=
null
?
$request
->
anexoLattesCoordenador
:
""
,
'anexoPlanilhaPontuacao'
=>
$request
->
anexoPlanilha
!=
null
?
$request
->
anexoPlanilha
:
""
,
]);
//$trabalho = Trabalho::create([
$trabalho
[
'titulo'
]
=
$request
->
nomeProjeto
;
$trabalho
[
'coordenador_id'
]
=
$coordenador
->
id
;
$trabalho
[
'grande_area_id'
]
=
$request
->
grandeArea
;
$trabalho
[
'area_id'
]
=
$request
->
area
;
$trabalho
[
'sub_area_id'
]
=
$request
->
subArea
;
$trabalho
[
'pontuacaoPlanilha'
]
=
$request
->
pontuacaoPlanilha
;
$trabalho
[
'linkGrupoPesquisa'
]
=
$request
->
linkGrupo
;
$trabalho
[
'linkLattesEstudante'
]
=
$request
->
linkLattesEstudante
;
$trabalho
[
'data'
]
=
$mytime
;
$trabalho
[
'evento_id'
]
=
$request
->
editalId
;
$trabalho
[
'status'
]
=
'Submetido'
;
$trabalho
[
'proponente_id'
]
=
$proponente
->
id
;
//Anexos
$trabalho
[
'anexoDecisaoCONSU'
]
=
$request
->
anexoCONSU
!=
null
?
$request
->
anexoCONSU
:
""
;
$trabalho
[
'anexoProjeto'
]
=
$request
->
anexoProjeto
!=
null
?
$request
->
anexoProjeto
:
""
;
$trabalho
[
'anexoAutorizacaoComiteEtica'
]
=
$request
->
anexoComiteEtica
!=
null
?
$request
->
anexoComiteEtica
:
""
;
$trabalho
[
'justificativaAutorizacaoEtica'
]
=
$request
->
justificativaAutorizacaoEtica
!=
null
?
$request
->
justificativaAutorizacaoEtica
:
""
;
$trabalho
[
'anexoLattesCoordenador'
]
=
$request
->
anexoLattesCoordenador
!=
null
?
$request
->
anexoLattesCoordenador
:
""
;
$trabalho
[
'anexoPlanilhaPontuacao'
]
=
$request
->
anexoPlanilha
!=
null
?
$request
->
anexoPlanilha
:
""
;
//dd($trabalho);
}
else
{
//Caso em que o anexo da Decisão do CONSU não necessário
...
...
@@ -169,28 +173,26 @@ class TrabalhoController extends Controller
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
]);
$trabalho
=
Trabalho
::
create
([
'titulo'
=>
$request
->
nomeProjeto
,
'coordenador_id'
=>
$coordenador
->
id
,
'grande_area_id'
=>
$request
->
grandeArea
,
'area_id'
=>
$request
->
area
,
'sub_area_id'
=>
$request
->
subArea
,
'pontuacaoPlanilha'
=>
$request
->
pontuacaoPlanilha
,
'linkGrupoPesquisa'
=>
$request
->
linkGrupo
,
'linkLattesEstudante'
=>
$request
->
linkLattesEstudante
,
'data'
=>
$mytime
,
'evento_id'
=>
$request
->
editalId
,
'avaliado'
=>
0
,
'status'
=>
'Submetido'
,
'proponente_id'
=>
$proponente
->
id
,
//$trabalho = Trabalho::create([
$trabalho
[
'titulo'
]
=
$request
->
nomeProjeto
;
$trabalho
[
'coordenador_id'
]
=
$coordenador
->
id
;
$trabalho
[
'grande_area_id'
]
=
$request
->
grandeArea
;
$trabalho
[
'area_id'
]
=
$request
->
area
;
$trabalho
[
'sub_area_id'
]
=
$request
->
subArea
;
$trabalho
[
'pontuacaoPlanilha'
]
=
$request
->
pontuacaoPlanilha
;
$trabalho
[
'linkGrupoPesquisa'
]
=
$request
->
linkGrupo
;
$trabalho
[
'linkLattesEstudante'
]
=
$request
->
linkLattesEstudante
;
$trabalho
[
'data'
]
=
$mytime
;
$trabalho
[
'evento_id'
]
=
$request
->
editalId
;
$trabalho
[
'status'
]
=
'Submetido'
;
$trabalho
[
'proponente_id'
]
=
$proponente
->
id
;
//Anexos
'anexoProjeto'
=>
$request
->
anexoProjeto
,
'anexoAutorizacaoComiteEtica'
=>
$request
->
anexoComiteEtica
,
'justificativaAutorizacaoEtica'
=>
$request
->
justificativaAutorizacaoEtica
,
'anexoLattesCoordenador'
=>
$request
->
anexoLattesCoordenador
,
'anexoPlanilhaPontuacao'
=>
$request
->
anexoPlanilha
,
]);
$trabalho
[
'anexoProjeto'
]
=
$request
->
anexoProjeto
;
$trabalho
[
'anexoAutorizacaoComiteEtica'
]
=
$request
->
anexoComiteEtica
;
$trabalho
[
'justificativaAutorizacaoEtica'
]
=
$request
->
justificativaAutorizacaoEtica
;
$trabalho
[
'anexoLattesCoordenador'
]
=
$request
->
anexoLattesCoordenador
;
$trabalho
[
'anexoPlanilhaPontuacao'
]
=
$request
->
anexoPlanilha
;
}
//Envia email com senha temp para cada participante do projeto
...
...
@@ -257,19 +259,7 @@ class TrabalhoController extends Controller
$pasta
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
;
//-- Se existem anexos temporários, utilizá-los
$anexosTemp
=
AnexosTemp
::
where
(
'eventoId'
,
$request
->
editalId
)
->
where
(
'proponenteId'
,
Auth
::
user
()
->
id
)
->
orderByDesc
(
'updated_at'
)
->
first
();
if
(
$anexosTemp
!=
null
){
$this
->
armazenarAnexosFinais
(
$anexosTemp
,
$request
,
$pasta
,
$trabalho
,
$evento
);
}
$trabalho
->
update
();
//Deletando arquivos temporários
Storage
::
deleteDirectory
(
'anexosTemp/'
.
$request
->
editalId
.
'/'
.
Auth
::
user
()
->
id
);
$anexosTemp
->
delete
();
$trabalho
=
$this
->
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
);
$subject
=
"Submissão de Trabalho"
;
$autor
=
Auth
()
->
user
();
...
...
@@ -281,91 +271,134 @@ class TrabalhoController extends Controller
return
redirect
()
->
route
(
'evento.visualizar'
,[
'id'
=>
$request
->
editalId
]);
}
//Armazena temporariamente anexos da submissão, no banco de dados e no storage
public
function
armazenarAnexosTemp
(
Request
$request
,
$proponenteId
){
public
function
storeParcial
(
Request
$request
){
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
$evento
=
Evento
::
find
(
$request
->
editalId
);
$coordenador
=
CoordenadorComissao
::
find
(
$evento
->
coordenadorId
);
//---Anexos do Projeto
$anexosTemp
=
AnexosTemp
::
where
(
'eventoId'
,
$request
->
editalId
)
->
where
(
'proponenteId'
,
$proponenteId
)
//Relaciona o projeto criado com o proponente que criou o projeto
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
$trabalho
=
"trabalho"
;
if
(
$evento
->
inicioSubmissao
>
$mytime
){
if
(
$mytime
>=
$evento
->
fimSubmissao
){
return
redirect
()
->
route
(
'home'
);
}
}
//--Salvando os dados da submissão temporariamente
$this
->
armazenarInfoTemp
(
$request
,
$proponente
);
return
redirect
()
->
route
(
'projetos.edital'
,[
'id'
=>
$request
->
editalId
]);
}
//Armazena temporariamente dados da submissão, no banco de dados e no storage
public
function
armazenarInfoTemp
(
Request
$request
,
$proponente
){
//---Dados do Projeto
$trabalho
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
where
(
'evento_id'
,
$request
->
editalId
)
->
where
(
'status'
,
'Rascunho'
)
->
orderByDesc
(
'updated_at'
)
->
first
();
if
(
$anexosTemp
==
null
){
$anexosTemp
=
new
AnexosTemp
();
$jaExiste
=
false
;
}
else
{
$jaExiste
=
true
;
// dd($trabalho);
if
(
$trabalho
==
null
){
$trabalho
=
new
Trabalho
();
$trabalho
->
proponente_id
=
$proponente
->
id
;
$trabalho
->
evento_id
=
$request
->
editalId
;
$trabalho
->
status
=
'Rascunho'
;
$stringKeys
=
[
'titulo'
,
'linkGrupoPesquisa'
,
'linkLattesEstudante'
,
'pontuacaoPlanilha'
,
'anexoProjeto'
,
'anexoPlanilhaPontuacao'
,
'anexoLattesCoordenador'
];
$intKeys
=
[
'grande_area_id'
,
'area_id'
,
'sub_area_id'
,
'coordenador_id'
];
$trabalho
->
fill
(
array_fill_keys
(
$stringKeys
,
""
)
+
array_fill_keys
(
$intKeys
,
1
)
)
->
save
();
// dd($trabalho);
}
if
(
!
(
is_null
(
$request
->
nomeProjeto
))
)
{
$trabalho
->
titulo
=
$request
->
nomeProjeto
;
}
if
(
!
(
is_null
(
$request
->
grandeArea
))){
$trabalho
->
grande_area_id
=
$request
->
grandeArea
;
}
if
(
!
(
is_null
(
$request
->
area
))){
$trabalho
->
area_id
=
$request
->
area
;
}
if
(
!
(
is_null
(
$request
->
subArea
))){
$trabalho
->
sub_area_id
=
$request
->
subArea
;
}
if
(
!
(
is_null
(
$request
->
pontuacaoPlanilha
))){
$trabalho
->
pontuacaoPlanilha
=
$request
->
pontuacaoPlanilha
;
}
if
(
!
(
is_null
(
$request
->
linkGrupo
))){
$trabalho
->
linkGrupoPesquisa
=
$request
->
linkGrupo
;
}
$pasta
=
'anexosTemp/'
.
$request
->
editalId
.
'/'
.
$proponenteId
;
//Anexos do projeto
$pasta
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
;
if
(
!
(
is_null
(
$request
->
anexoCONSU
))
)
{
$
anexosTemp
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
"CONSU.pdf"
);
$
trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
"CONSU.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoComiteEtica
)))
{
$
anexosTemp
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
"Comite_de_etica.pdf"
);
$
trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
"Comite_de_etica.pdf"
);
}
if
(
!
(
is_null
(
$request
->
justificativaAutorizacaoEtica
)))
{
$
anexosTemp
->
justificativaAutorizacaoEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
justificativaAutorizacaoEtica
,
"Justificativa.pdf"
);
$
trabalho
->
justificativaAutorizacaoEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
justificativaAutorizacaoEtica
,
"Justificativa.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoProjeto
)))
{
$
anexosTemp
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
"Projeto.pdf"
);
$
trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
"Projeto.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoLattesCoordenador
)))
{
$
anexosTemp
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLattesCoordenador
,
"Latter_Coordenador.pdf"
);
$
trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLattesCoordenador
,
"Latter_Coordenador.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoPlanilha
)))
{
$anexosTemp
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha.pdf"
);
}
$anexosTemp
->
eventoId
=
$request
->
editalId
;
$anexosTemp
->
proponenteId
=
$proponenteId
;
if
(
!
$jaExiste
){
$anexosTemp
->
save
();
}
else
{
$anexosTemp
->
update
();
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha.pdf"
);
}
$trabalho
->
update
();
//---Anexos planos de trabalho
return
$trabalho
;
}
public
function
armazenarAnexosFinais
(
$anexosTemp
,
$request
,
$pasta
,
$trabalho
,
$evento
){
public
function
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
){
// Anexo Projeto
if
(
(
!
isset
(
$request
->
anexoProjeto
)
&&
$request
->
anexoProjetoPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoProjeto
)){
Storage
::
move
(
$anexosTemp
->
anexoProjeto
,
$pasta
.
'/Projeto.pdf'
);
$trabalho
->
anexoProjeto
=
$pasta
.
'/Projeto.pdf'
;
if
(
(
!
isset
(
$request
->
anexoProjeto
)
&&
$request
->
anexoProjetoPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoProjeto
)){
$trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
'Projeto.pdf'
);
}
//Anexo Decisão CONSU
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
)
{
if
(
(
!
isset
(
$request
->
anexoCONSU
)
&&
$request
->
anexoConsuPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoCONSU
)){
Storage
::
move
(
$anexosTemp
->
anexoDecisaoCONSU
,
$pasta
.
'/CONSU.pdf'
);
$trabalho
->
anexoDecisaoCONSU
=
$pasta
.
'/CONSU.pdf'
;
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
'CONSU.pdf'
);
}
}
//Autorização ou Justificativa
if
(
(
!
isset
(
$request
->
anexoComiteEtica
)
&&
$request
->
anexoComitePreenchido
==
'sim'
)
||
isset
(
$request
->
anexoComiteEtica
)){
Storage
::
move
(
$anexosTemp
->
anexoAutorizacaoComiteEtica
,
$pasta
.
'/Comite_de_etica.pdf'
);
$trabalho
->
anexoAutorizacaoComiteEtica
=
$pasta
.
'/Comite_de_etica.pdf'
;
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
'Comite_de_etica.pdf'
);
}
elseif
(
(
!
isset
(
$request
->
justificativaAutorizacaoEtica
)
&&
$request
->
anexoJustificativaPreenchido
==
'sim'
)
||
isset
(
$request
->
justificativaAutorizacaoEtica
)){
Storage
::
move
(
$anexosTemp
->
justificativaAutorizacaoEtica
,
$pasta
.
'/Justificativa.pdf'
);
$trabalho
->
justificativaAutorizacaoEtica
=
$pasta
.
'/Justificativa.pdf'
;
$trabalho
->
justificativaAutorizacaoEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
justificativaAutorizacaoEtica
,
'Justificativa.pdf'
);
}
//Anexo Lattes
if
(
(
!
isset
(
$request
->
anexoLattesCoordenador
)
&&
$request
->
anexoLattesPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoLattesCoordenador
)){
Storage
::
move
(
$anexosTemp
->
anexoLattesCoordenador
,
$pasta
.
'/Latter_Coordenador.pdf'
);
$trabalho
->
anexoLattesCoordenador
=
$pasta
.
'/Latter_Coordenador.pdf'
;
$trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLattesCoordenador
,
'Latter_Coordenador.pdf'
);
}
//Anexo Planilha
if
(
(
!
isset
(
$request
->
anexoPlanilha
)
&&
$request
->
anexoPlanilhaPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoPlanilha
)){
Storage
::
move
(
$anexosTemp
->
anexoPlanilhaPontuacao
,
$pasta
.
'/Planilha.pdf'
);
$trabalho
->
anexoPlanilhaPontuacao
=
$pasta
.
'/Planilha.pdf'
;
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
'Planilha.pdf'
);
}
$trabalho
->
update
();
return
$trabalho
;
}
/**
* Display the specified resource.
...
...
@@ -416,7 +449,7 @@ class TrabalhoController extends Controller
$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
();
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$id
)
->
get
();
return
view
(
'projeto.editar'
)
->
with
([
'projeto'
=>
$projeto
,
'grandeAreas'
=>
$grandeAreas
,
...
...
@@ -537,7 +570,6 @@ class TrabalhoController extends Controller
foreach
(
$users
as
$user
)
{
array_push
(
$emailParticipantes
,
$user
->
email
);
}
foreach
(
$request
->
emailParticipante
as
$key
=>
$value
)
{
// criando novos participantes que podem ter sido adicionados
if
(
!
(
in_array
(
$request
->
emailParticipante
[
$key
],
$emailParticipantes
,
false
)))
{
...
...
@@ -593,6 +625,7 @@ class TrabalhoController extends Controller
if
(
in_array
(
$request
->
emailParticipante
[
$key
],
$emailParticipantes
,
false
))
{
$userParticipante
=
User
::
where
(
'email'
,
$value
)
->
first
();
if
(
$userParticipante
!=
null
){
$user
=
User
::
where
(
'email'
,
$request
->
emailParticipante
[
$key
])
->
first
();
$participante
=
Participante
::
where
([[
'user_id'
,
'='
,
$user
->
id
],
[
'trabalho_id'
,
'='
,
$trabalho
->
id
]])
->
first
();
...
...
@@ -603,25 +636,42 @@ class TrabalhoController extends Controller
$participante
->
update
();
//atualizando planos de trabalho
if
(
array_key_exists
(
$key
,
$request
->
anexoPlanoTrabalho
))
{
if
(
!
(
is_null
(
$request
->
anexoPlanoTrabalho
[
$key
])))
{
if
(
$request
->
anexoPlanoTrabalho
!=
null
&&
array_key_exists
(
$key
,
$request
->
anexoPlanoTrabalho
))
{
if
(
!
(
is_null
(
$request
->
anexoPlanoTrabalho
[
$key
])))
{
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
();
Storage
::
delete
(
$arquivo
->
nome
);
$arquivo
->
delete
();
$path
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
$request
->
nomePlanoTrabalho
[
$key
]
.
".pdf"
;
$file
=
$request
->
anexoPlanoTrabalho
[
$key
];
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
$arquivo
->
participanteId
=
$participante
->
id
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
//se plano já existir, deletar
if
(
$arquivo
!=
null
){
Storage
::
delete
(
$arquivo
->
nome
);
$arquivo
->
delete
();
}
//atualizar plano
if
(
$request
->
semPlano
[
$key
]
==
null
){
$path
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
$request
->
nomePlanoTrabalho
[
$key
]
.
".pdf"
;
$file
=
$request
->
anexoPlanoTrabalho
[
$key
];
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
$arquivo
->
participanteId
=
$participante
->
id
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
}
}
}
//removendo planos de trabalho
if
(
$request
->
nomePlanoTrabalho
!=
null
&&
array_key_exists
(
$key
,
$request
->
nomePlanoTrabalho
)){
if
(
$request
->
semPlano
[
$key
]
==
'sim'
){
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
();
//se plano já existir, deletar
if
(
$arquivo
!=
null
){
Storage
::
delete
(
$arquivo
->
nome
);
$arquivo
->
delete
();
}
}
}
}
...
...
@@ -632,13 +682,14 @@ class TrabalhoController extends Controller
$participantesUsersIds
=
Participante
::
where
(
'trabalho_id'
,
'='
,
$trabalho
->
id
)
->
select
(
'user_id'
)
->
get
();
$users
=
User
::
whereIn
(
'id'
,
$participantesUsersIds
)
->
get
();
foreach
(
$users
as
$user
)
{
//dd($user);
if
(
!
(
in_array
(
$user
->
email
,
$request
->
emailParticipante
,
false
)))
{
$participante
=
Participante
::
where
([[
'user_id'
,
'='
,
$user
->
id
],
[
'trabalho_id'
,
'='
,
$trabalho
->
id
]])
->
first
();
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
);
Storage
::
delete
(
$arquivo
->
nome
);
$arquivo
->
delete
();
foreach
(
$users
as
$user
)
{
if
(
!
(
in_array
(
$user
->
email
,
$request
->
emailParticipante
,
false
)))
{
$participante
=
Participante
::
where
([[
'user_id'
,
'='
,
$user
->
id
],
[
'trabalho_id'
,
'='
,
$trabalho
->
id
]])
->
first
();
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
();
if
(
$arquivo
!=
null
){
Storage
::
delete
(
$arquivo
->
nome
);
$arquivo
->
delete
();
}
$participante
->
delete
();
}
}
...
...
@@ -656,6 +707,8 @@ class TrabalhoController extends Controller
{
$trabalho
=
Trabalho
::
find
(
$request
->
id
);
//dd($trabalho);
Storage
::
deleteDirectory
(
'trabalhos/'
.
$trabalho
->
evento
->
id
.
'/'
.
$trabalho
->
id
);
$trabalho
->
delete
();
return
redirect
()
->
back
();
}
...
...
@@ -855,15 +908,27 @@ class TrabalhoController extends Controller
public
function
baixarAnexoJustificativa
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
justificativaAutorizacaoEtica
);
if
(
Storage
::
disk
()
->
exists
(
$projeto
->
justificativaAutorizacaoEtica
))
{
return
Storage
::
download
(
$projeto
->
justificativaAutorizacaoEtica
);
}
return
abort
(
404
);
}
public
function
baixarAnexoTemp
(
$eventoId
,
$nomeAnexo
)
{
$proponente
Id
=
Auth
::
user
()
->
id
;
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
()
;
$anexosTemp
=
AnexosTemp
::
where
(
'eventoId'
,
$eventoId
)
->
where
(
'proponenteId'
,
$proponenteId
)
->
orderByDesc
(
'updated_at'
)
->
first
();
$trabalho
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
where
(
'evento_id'
,
$eventoId
)
->
where
(
'status'
,
'Rascunho'
)
->
orderByDesc
(
'updated_at'
)
->
first
();
return
Storage
::
download
(
$trabalho
->
$nomeAnexo
);
}
public
function
baixarEventoTemp
(
$nomeAnexo
){
$eventoTemp
=
Evento
::
where
(
'criador_id'
,
Auth
::
user
()
->
id
)
->
where
(
'anexosStatus'
,
'temporario'
)
->
orderByDesc
(
'updated_at'
)
->
first
();
return
Storage
::
download
(
$
anexos
Temp
->
$nomeAnexo
);
return
Storage
::
download
(
$
evento
Temp
->
$nomeAnexo
);
}
}
app/Http/Controllers/UserController.php
View file @
854bd537
...
...
@@ -14,6 +14,7 @@ use App\Endereco;
use
App\Trabalho
;
use
App\Coautor
;
use
App\Evento
;
use
Carbon\Carbon
;
use
Illuminate\Support\Facades\Log
;
class
UserController
extends
Controller
...
...
@@ -27,7 +28,9 @@ class UserController extends Controller
return
redirect
()
->
route
(
'home'
);
}
Log
::
debug
(
'UserController index'
);
return
view
(
'index'
,
[
'eventos'
=>
$eventos
]);
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'index'
,
[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
]);
//return view('auth.login');
}
...
...
app/Utils/GrupoPesquisaValidation.php
View file @
854bd537
...
...
@@ -16,14 +16,19 @@ class GrupoPesquisaValidation
$url
=
filter_var
(
$url
,
FILTER_SANITIZE_URL
);
// Validate url
if
(
!
filter_var
(
$url
,
FILTER_VALIDATE_URL
))
{
return
false
;
}
// // Validate url
// if (!filter_var($url, FILTER_VALIDATE_URL)) {
// return false;
// }
//If url doesn't have a protocol
if
(
substr
(
$url
,
0
,
4
)
!=
'http'
){
$url
=
'http://'
.
$url
;
}
//
if(parse_url($url)['host'] != 'dgp.cnpq.br'){
//
return false;
//
}
if
(
parse_url
(
$url
)[
'host'
]
!=
'dgp.cnpq.br'
){
return
false
;
}
if
(
$this
->
getHttpResponseCode_using_getheaders
(
$url
)
!=
200
){
return
false
;
...
...
app/Utils/LattesValidation.php
View file @
854bd537
...
...
@@ -9,18 +9,26 @@ class LattesValidation
function
isValidUrl
(
$url
)
{
// first do some quick sanity checks:
if
(
!
$url
||
!
is_string
(
$url
))
{
return
false
;
}
$url
=
filter_var
(
$url
,
FILTER_SANITIZE_URL
);
// Validate url
if
(
!
filter_var
(
$url
,
FILTER_VALIDATE_URL
))
{
return
false
;
}
// if (!filter_var($url, FILTER_VALIDATE_URL)) {
// dd('1');
// return false;
// }
//If url doesn't have a protocol
if
(
substr
(
$url
,
0
,
4
)
!=
'http'
){
$url
=
'http://'
.
$url
;
}
//dd(parse_url($url)['host'] != 'lattes.cnpq.br');
if
(
parse_url
(
$url
)[
'host'
]
!=
'buscatextual.cnpq.br'
&&
parse_url
(
$url
)[
'host'
]
!=
'lattes.cnpq.br'
){
return
false
;
}
...
...
composer.lock
View file @
854bd537
...
...
@@ -234,16 +234,16 @@
},
{
"name": "egulias/email-validator",
"version": "2.1.1
7
",
"version": "2.1.1
8
",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "
ade6887fd9bd74177769645ab5c474824f8a418a
"
"reference": "
cfa3d44471c7f5bfb684ac2b0da7114283d78441
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/
ade6887fd9bd74177769645ab5c474824f8a418a
",
"reference": "
ade6887fd9bd74177769645ab5c474824f8a418a
",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/
cfa3d44471c7f5bfb684ac2b0da7114283d78441
",
"reference": "
cfa3d44471c7f5bfb684ac2b0da7114283d78441
",
"shasum": ""
},
"require": {
...
...
@@ -267,7 +267,7 @@
},
"autoload": {
"psr-4": {
"Egulias\\EmailValidator\\": "
EmailValidator
"
"Egulias\\EmailValidator\\": "
src
"
}
},
"notification-url": "https://packagist.org/downloads/",
...
...
@@ -288,7 +288,7 @@
"validation",
"validator"
],
"time": "2020-0
2
-1
3
T2
2:36:52
+00:00"
"time": "2020-0
6
-1
6
T2
0:11:17
+00:00"
},
{
"name": "fideloper/proxy",
...
...
@@ -397,16 +397,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "6.5.
4
",
"version": "6.5.
5
",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "
a4a1b6930528a8f7ee03518e6442ec7a44155d9d
"
"reference": "
9d4290de1cfd701f38099ef7e183b64b4b7b0c5e
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/
a4a1b6930528a8f7ee03518e6442ec7a44155d9d
",
"reference": "
a4a1b6930528a8f7ee03518e6442ec7a44155d9d
",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/
9d4290de1cfd701f38099ef7e183b64b4b7b0c5e
",
"reference": "
9d4290de1cfd701f38099ef7e183b64b4b7b0c5e
",
"shasum": ""
},
"require": {
...
...
@@ -414,7 +414,7 @@
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.6.1",
"php": ">=5.5",
"symfony/polyfill-intl-idn": "1.17.0"
"symfony/polyfill-intl-idn": "
^
1.17.0"
},
"require-dev": {
"ext-curl": "*",
...
...
@@ -460,7 +460,7 @@
"rest",
"web service"
],
"time": "2020-0
5-25T19:35
:0
5
+00:00"
"time": "2020-0
6-16T21:01
:0
6
+00:00"
},
{
"name": "guzzlehttp/promises",
...
...
@@ -586,16 +586,16 @@
},
{
"name": "laravel/framework",
"version": "v6.18.
19
",
"version": "v6.18.
20
",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "
69321afec31f4a908112e5dc8995fc91024fd971
"
"reference": "
2862a9857533853bb2851bac39d65e3bfb8ba6cd
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/
69321afec31f4a908112e5dc8995fc91024fd971
",
"reference": "
69321afec31f4a908112e5dc8995fc91024fd971
",
"url": "https://api.github.com/repos/laravel/framework/zipball/
2862a9857533853bb2851bac39d65e3bfb8ba6cd
",
"reference": "
2862a9857533853bb2851bac39d65e3bfb8ba6cd
",
"shasum": ""
},
"require": {
...
...
@@ -677,6 +677,7 @@
"suggest": {
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
"ext-ftp": "Required to use the Flysystem FTP driver.",
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
"ext-memcached": "Required to use the memcache cache driver.",
"ext-pcntl": "Required to use all features of the queue worker.",
...
...
@@ -729,7 +730,7 @@
"framework",
"laravel"
],
"time": "2020-06-
09
T13:
59
:3
4
+00:00"
"time": "2020-06-
16
T13:
21
:3
3
+00:00"
},
{
"name": "laravel/tinker",
...
...
@@ -1215,16 +1216,16 @@
},
{
"name": "opis/closure",
"version": "3.5.
4
",
"version": "3.5.
5
",
"source": {
"type": "git",
"url": "https://github.com/opis/closure.git",
"reference": "
1d0deef692f66dae5d70663caee2867d0971306b
"
"reference": "
dec9fc5ecfca93f45cd6121f8e6f14457dff372c
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opis/closure/zipball/
1d0deef692f66dae5d70663caee2867d0971306b
",
"reference": "
1d0deef692f66dae5d70663caee2867d0971306b
",
"url": "https://api.github.com/repos/opis/closure/zipball/
dec9fc5ecfca93f45cd6121f8e6f14457dff372c
",
"reference": "
dec9fc5ecfca93f45cd6121f8e6f14457dff372c
",
"shasum": ""
},
"require": {
...
...
@@ -1272,7 +1273,7 @@
"serialization",
"serialize"
],
"time": "2020-06-
0
7T1
1:41:29
+00:00"
"time": "2020-06-
1
7T1
4:59:55
+00:00"
},
{
"name": "paragonie/random_compat",
...
...
@@ -5407,16 +5408,16 @@
},
{
"name": "webmozart/assert",
"version": "1.
8
.0",
"version": "1.
9
.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "
ab2cb0b3b559010b75981b1bdce728da3ee90ad6
"
"reference": "
9dc4f203e36f2b486149058bade43c851dd97451
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/
ab2cb0b3b559010b75981b1bdce728da3ee90ad6
",
"reference": "
ab2cb0b3b559010b75981b1bdce728da3ee90ad6
",
"url": "https://api.github.com/repos/webmozart/assert/zipball/
9dc4f203e36f2b486149058bade43c851dd97451
",
"reference": "
9dc4f203e36f2b486149058bade43c851dd97451
",
"shasum": ""
},
"require": {
...
...
@@ -5424,6 +5425,7 @@
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
...
...
@@ -5451,7 +5453,7 @@
"check",
"validate"
],
"time": "2020-0
4
-1
8
T1
2
:1
2
:4
8
+00:00"
"time": "2020-0
6
-1
6
T1
0
:1
6
:4
2
+00:00"
}
],
"aliases": [],
...
...
database/migrations/2020_02_05_123153_create_eventos_table.php
View file @
854bd537
...
...
@@ -32,6 +32,7 @@ class CreateEventosTable extends Migration
$table
->
integer
(
'coordenadorId'
)
->
nullable
();
$table
->
string
(
'pdfEdital'
)
->
nullable
();
$table
->
string
(
'modeloDocumento'
)
->
nullable
();
$table
->
string
(
'anexosStatus'
)
->
nullable
();
});
}
...
...
database/migrations/2020_06_15_160417_create_anexos_temps_table.php
deleted
100644 → 0
View file @
72241b3c
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateAnexosTempsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'anexos_temps'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
string
(
'anexoProjeto'
)
->
nullable
();
$table
->
string
(
'anexoDecisaoCONSU'
)
->
nullable
();
$table
->
string
(
'anexoPlanilhaPontuacao'
)
->
nullable
();
$table
->
string
(
'anexoLattesCoordenador'
)
->
nullable
();
$table
->
string
(
'anexoAutorizacaoComiteEtica'
)
->
nullable
();
$table
->
string
(
'justificativaAutorizacaoEtica'
)
->
nullable
();
$table
->
integer
(
'eventoId'
);
$table
->
integer
(
'proponenteId'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'anexos_temps'
);
}
}
resources/views/administrador/editais.blade.php
View file @
854bd537
...
...
@@ -8,8 +8,9 @@
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Meus
Editais
</
h3
>
</
div
>
<
a
href
=
"
{
{route('evento.criar')}
}
"
class
=
"btn btn-primary"
>
Criar
Edital
</
a
>
</
div
>
<
div
class
=
"col-sm-2"
>
<
a
href
=
"
{
{route('evento.criar')}
}
"
class
=
"btn btn-primary"
style
=
"float: right;"
>
Criar
Edital
</
a
>
</
div
>
</
div
>
<
hr
>
...
...
@@ -37,7 +38,7 @@
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('
coord.detalhesEvento', ['eventoI
d' =>
$evento->id
]) }}"
class
=
"dropdown-item text-center"
>
<
a
href
=
"{{ route('
evento.editar', ['i
d' =>
$evento->id
]) }}"
class
=
"dropdown-item text-center"
>
Editar
Edital
</
a
>
...
...
resources/views/administrador/index.blade.php
View file @
854bd537
...
...
@@ -8,7 +8,7 @@
<
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.editais')}
}
"
style
=
"text-decoration:none; color: inherit;"
>
<
a
href
=
"{{
route('admin.editais')
}}"
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"
>
Editais
</
h2
>
...
...
resources/views/administrador/usersAdmin.blade.php
View file @
854bd537
...
...
@@ -10,7 +10,7 @@
<
h3
>
Usuários
</
h3
>
</
div
>
<
div
class
=
"col-sm-2"
>
<
a
href
=
"
{
{route('admin.user.create')}
}
"
class
=
"btn btn-primary"
>
{{
__
(
'Criar usuário'
)
}}
</
a
>
<
a
href
=
"
{
{route('admin.user.create')}
}
"
class
=
"btn btn-primary"
style
=
"float: right;"
>
{{
__
(
'Criar usuário'
)
}}
</
a
>
</
div
>
</
div
>
<
div
class
=
"row"
>
...
...
resources/views/coordenador/home.blade.php
View file @
854bd537
...
...
@@ -75,7 +75,11 @@
</
p
>
<
p
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
Visualizar
edital
</
a
>
@
if
(
Auth
::
check
())
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
Visualizar
edital
</
a
>
@
else
<
a
href
=
"{{ route('evento.visualizarNaoLogado', ['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
Visualizar
edital
</
a
>
@
endif
</
p
>
</
div
>
...
...
resources/views/evento/criarEvento.blade.php
View file @
854bd537
...
...
@@ -74,12 +74,17 @@
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"coordenador_id"
class
=
"col-form-label"
>
{{
__
(
'Coordenador*:'
)
}}
</
label
>
<
select
class
=
"form-control @error('
funcaoParticipante
') is-invalid @enderror"
id
=
"coordenador_id"
name
=
"coordenador_id"
>
<
select
class
=
"form-control @error('
coordenador_id
') is-invalid @enderror"
id
=
"coordenador_id"
name
=
"coordenador_id"
>
<
option
value
=
""
disabled
selected
hidden
>--
Coordenador
da
Comissão
Avaliadora
--</
option
>
@
foreach
(
$coordenadors
as
$coordenador
)
<
option
@
if
(
old
(
'coordenador_id'
)
==
$coordenador
->
id
)
selected
@
endif
value
=
"
{
{$coordenador->id}}">{{$coordenador->user->name}
}
</option>
@endforeach
</select>
@error('coordenador_id')
<span class="
invalid
-
feedback
" role="
alert
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
</div>
<hr>
...
...
@@ -159,8 +164,12 @@
<div class="
row
justify
-
content
-
center
" style="
margin
-
top
:
10
px
">
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
pdfEdital
">Anexar edital*:</label>
<input type="
file
" class="
form
-
control
-
file
@
error
(
'pdfEdital'
)
is
-
invalid
@
enderror
" name="
pdfEdital
" value="
{{
old
(
'pdfEdital'
)
}}
" id="
pdfEdital
">
<label for="
pdfEdital
">Anexar edital*:</label>
@if(old('pdfEditalPreenchido') != null)
<a id="
pdfEditalTemp
" href="
{{
route
(
'baixar.evento.temp'
,
[
'nomeAnexo'
=>
'pdfEdital'
])}}
">Arquivo atual</a>
@endif
<input type="
hidden
" id="
pdfEditalPreenchido
" name="
pdfEditalPreenchido
" value="
{{
old
(
'pdfEditalPreenchido'
)
}}
" >
<input type="
file
" class="
form
-
control
-
file
@
error
(
'pdfEdital'
)
is
-
invalid
@
enderror
" name="
pdfEdital
" value="
{{
old
(
'pdfEdital'
)
}}
" id="
pdfEdital
" onchange="
exibirAnexoTemp
(
this
)
">
<small>O arquivo selecionado deve ser no formato PDF de até 2mb.</small>
@error('pdfEdital')
<span class="
invalid
-
feedback
" role="
alert
">
...
...
@@ -173,7 +182,11 @@
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
modeloDocumento
">Anexar arquivo com os modelos de documentos do edital:</label>
<input type="
file
" class="
form
-
control
-
file
@
error
(
'modeloDocumento'
)
is
-
invalid
@
enderror
" name="
modeloDocumento
" value="
{{
old
(
'modeloDocumento'
)
}}
" id="
modeloDocumento
">
@if(old('modeloDocumentoPreenchido') != null)
<a id="
modeloDocumentoTemp
" href="
{{
route
(
'baixar.evento.temp'
,
[
'nomeAnexo'
=>
'modeloDocumento'
])}}
">Arquivo atual</a>
@endif
<input type="
hidden
" id="
modeloDocumentoPreenchido
" name="
modeloDocumentoPreenchido
" value="
{{
old
(
'modeloDocumentoPreenchido'
)
}}
" >
<input type="
file
" class="
form
-
control
-
file
@
error
(
'modeloDocumento'
)
is
-
invalid
@
enderror
" name="
modeloDocumento
" value="
{{
old
(
'modeloDocumento'
)
}}
" id="
modeloDocumento
" onchange="
exibirAnexoTemp
(
this
)
">
<small>O arquivo selecionado deve ter até 2mb.</small>
@error('modeloDocumento')
<span class="
invalid
-
feedback
" role="
alert
">
...
...
@@ -187,7 +200,7 @@
<div class="
row
justify
-
content
-
center
" style="
margin
:
20
px
0
20
px
0
">
<div class="
col
-
md
-
6
" style="
padding
-
left
:
0
">
<a class="
btn
btn
-
secondary
botao
-
form
" href="
{{
route
(
'
evento.listar
'
)}}
" style="
width
:
100
%
">Cancelar</a>
<a class="
btn
btn
-
secondary
botao
-
form
" href="
{{
route
(
'
admin.editais
'
)
}}
" style="
width
:
100
%
">Cancelar</a>
</div>
<div class="
col
-
md
-
6
" style="
padding
-
right
:
0
">
<button type="
submit
" class="
btn
btn
-
primary
botao
-
form
" style="
width
:
100
%
">
...
...
@@ -199,3 +212,19 @@
</div>
@endsection
@section('javascript')
<script type="
text
/
javascript
">
function exibirAnexoTemp(file){
console.log(file.id);
if(file.id === "
pdfEdital
"){
var pdfEditalPreenchido = document.getElementById('pdfEditalPreenchido');
pdfEditalPreenchido.value = "
sim
";
}
if(file.id === "
modeloDocumento
"){
var modeloDocumentoPreenchido = document.getElementById('modeloDocumentoPreenchido');
modeloDocumentoPreenchido.value = "
sim
";
}
}
</script>
@endsection
\ No newline at end of file
resources/views/evento/editarEvento.blade.php
View file @
854bd537
...
...
@@ -15,8 +15,8 @@
</
div
>
{{
--
nome
|
Tipo
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-
9
"
>
{{
--
Nome
do
evento
--
}}
<
label
for
=
"nome"
class
=
"col-form-label"
>
{{
__
(
'Nome'
)
}}
</
label
>
<
div
class
=
"col-sm-
6
"
>
{{
--
Nome
do
evento
--
}}
<
label
for
=
"nome"
class
=
"col-form-label"
>
{{
__
(
'Nome
*:
'
)
}}
</
label
>
<
input
value
=
"
{
{$evento->nome}
}
"
id
=
"nome"
type
=
"text"
class
=
"form-control @error('nome') is-invalid @enderror"
name
=
"nome"
value
=
"{{ old('nome') }}"
required
autocomplete
=
"nome"
autofocus
>
@
error
(
'nome'
)
...
...
@@ -28,7 +28,7 @@
{{
--
Tipo
do
evento
--
}}
<
div
class
=
"col-sm-3"
>
<
label
for
=
"tipo"
class
=
"col-form-label"
>
{{
__
(
'Tipo'
)
}}
</
label
>
<
label
for
=
"tipo"
class
=
"col-form-label"
>
{{
__
(
'Tipo
*:
'
)
}}
</
label
>
<!--
<
input
value
=
"
{
{$evento->tipo}
}
"
id
=
"tipo"
type
=
"text"
class
=
"form-control @error('tipo') is-invalid @enderror"
name
=
"tipo"
value
=
"{{ old('tipo') }}"
required
autocomplete
=
"tipo"
autofocus
>
-->
<
select
id
=
"tipo"
type
=
"text"
class
=
"form-control @error('tipo') is-invalid @enderror"
name
=
"tipo"
required
>
<
option
value
=
"PIBIC"
{{
$evento
->
tipo
==
"PIBIC"
?
'selected'
:
''
}}
>
PIBIC
</
option
>
...
...
@@ -41,13 +41,32 @@
</
span
>
@
enderror
</
div
>
{{
--
Tipo
do
evento
--
}}
<
div
class
=
"col-sm-3"
>
<
label
for
=
"natureza"
class
=
"col-form-label"
>
{{
__
(
'Natureza*:'
)
}}
</
label
>
<
select
id
=
"natureza"
type
=
"text"
class
=
"form-control @error('natureza') is-invalid @enderror"
name
=
"natureza"
value
=
"{{ old('natureza') }}"
required
>
@
foreach
(
$naturezas
as
$natureza
)
@
if
(
$natureza
->
id
===
$evento
->
natureza_id
)
<
option
value
=
"{{
$natureza->id
}}"
selected
>
{{
$natureza
->
nome
}}
</
option
>
@
else
<
option
value
=
"{{
$natureza->id
}}"
>
{{
$natureza
->
nome
}}
</
option
>
@
endif
@
endforeach
</
select
>
@
error
(
'natureza'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
</
div
>
{{
--
end
nome
|
Participantes
|
Tipo
--
}}
{{
--
Descricao
Evento
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleFormControlTextarea1"
>
Descrição
</
label
>
<
label
for
=
"exampleFormControlTextarea1"
>
Descrição
*:
</
label
>
<
textarea
class
=
"form-control @error('descricao') is-invalid @enderror"
value
=
"{{
$evento->descricao
}}"
id
=
"descricao"
name
=
"descricao"
rows
=
"3"
>
{{
$evento
->
descricao
}}
</
textarea
>
@
error
(
'descricao'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
...
...
@@ -57,7 +76,22 @@
</
div
>
</
div
>
</
div
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"coordenador_id"
class
=
"col-form-label"
>
{{
__
(
'Coordenador*:'
)
}}
</
label
>
<
select
class
=
"form-control @error('funcaoParticipante') is-invalid @enderror"
id
=
"coordenador_id"
name
=
"coordenador_id"
>
<
option
value
=
""
disabled
selected
hidden
>--
Coordenador
da
Comissão
Avaliadora
--</
option
>
@
foreach
(
$coordenadores
as
$coordenador
)
@
if
(
$coordenador
->
id
===
$evento
->
coordenadorId
)
<
option
value
=
"
{
{$coordenador->id}
}
"
selected
>
{{
$coordenador
->
user
->
name
}}
</
option
>
@
else
<
option
value
=
"
{
{$coordenador->id}}">{{$coordenador->user->name}
}
</option>
@endif
@endforeach
</select>
</div>
</div>
<hr>
<div class="
row
subtitulo
">
<div class="
col
-
sm
-
12
">
<p>Projetos</p>
...
...
@@ -68,45 +102,45 @@
{{-- Início da Submissão --}}
<div class="
col
-
sm
-
6
">
<
label
for
=
"inicioSubmissao"
class
=
"col-form-label"
>
{{
__
(
'Início da Submissão'
)
}}
</
label
>
<label for="
inicioSubmissao
" class="
col
-
form
-
label
">{{ __('Início da Submissão
*:
') }}</label>
<input value="
{{
$evento
->
inicioSubmissao
}}
" id="
inicioSubmissao
" type="
date
" class="
form
-
control
@
error
(
'inicioSubmissao'
)
is
-
invalid
@
enderror
" name="
inicioSubmissao
" value="
{{
old
(
'inicioSubmissao'
)
}}
" required autocomplete="
inicioSubmissao
" autofocus>
@error('inicioSubmissao')
<span class="
invalid
-
feedback
" role="
alert
">
<
strong
>
{{
$message
}}
</
strong
>
<strong>{{
$message
. date('d/m/Y', strtotime(
$ontem
?? '')) . '.'
}}</strong>
</span>
@enderror
</div>{{-- end Início da Submissão --}}
{{-- Fim da submissão --}}
<div class="
col
-
sm
-
6
">
<
label
for
=
"fimSubmissao"
class
=
"col-form-label"
>
{{
__
(
'Fim da Submissão'
)
}}
</
label
>
<label for="
fimSubmissao
" class="
col
-
form
-
label
">{{ __('Fim da Submissão
*:
') }}</label>
<input value="
{{
$evento
->
fimSubmissao
}}
" id="
fimSubmissao
" type="
date
" class="
form
-
control
@
error
(
'fimSubmissao'
)
is
-
invalid
@
enderror
" name="
fimSubmissao
" value="
{{
old
(
'fimSubmissao'
)
}}
" required autocomplete="
fimSubmissao
" autofocus>
@error('fimSubmissao')
<span class="
invalid
-
feedback
" role="
alert
">
<
strong
>
{{
$message
}}
</
strong
>
<strong>{{
$message
. date('d/m/Y', strtotime(old('inicioSubmissao'))) . '.'
}}</strong>
</span>
@enderror
</div>{{-- end Fim da submissão --}}
</div>{{-- end dataInicio | dataFim | inicioSubmissao | fimSubmissao --}}
<div class="
row
justify
-
content
-
center
">
<div class="
col
-
sm
-
6
">
<
label
for
=
"inicioRevisao"
class
=
"col-form-label"
>
{{
__
(
'Início da
Revisão
'
)
}}
</
label
>
<label for="
inicioRevisao
" class="
col
-
form
-
label
">{{ __('Início da
Avaliação*:
') }}</label>
<input value="
{{
$evento
->
inicioRevisao
}}
" id="
inicioRevisao
" type="
date
" class="
form
-
control
@
error
(
'inicioRevisao'
)
is
-
invalid
@
enderror
" name="
inicioRevisao
" value="
{{
old
(
'inicioRevisao'
)
}}
" required autocomplete="
inicioRevisao
" autofocus>
@error('inicioRevisao')
<span class="
invalid
-
feedback
" role="
alert
">
<
strong
>
{{
$message
}}
</
strong
>
<strong>{{
$message
. date('d/m/Y', strtotime(
$ontem
?? '')) . '.'
}}</strong>
</span>
@enderror
</div>
<div class="
col
-
sm
-
6
">
<
label
for
=
"fimRevisao"
class
=
"col-form-label"
>
{{
__
(
'Fim da
Revisão
'
)
}}
</
label
>
<label for="
fimRevisao
" class="
col
-
form
-
label
">{{ __('Fim da
Avaliação*:
') }}</label>
<input value="
{{
$evento
->
fimRevisao
}}
" id="
fimRevisao
" type="
date
" class="
form
-
control
@
error
(
'fimRevisao'
)
is
-
invalid
@
enderror
" name="
fimRevisao
" value="
{{
old
(
'fimRevisao'
)
}}
" required autocomplete="
fimRevisao
" autofocus>
@error('fimRevisao')
<span class="
invalid
-
feedback
" role="
alert
">
<
strong
>
{{
$message
}}
</
strong
>
<strong>{{
$message
. date('d/m/Y', strtotime( old('inicioRevisao') )) . '.'
}}</strong>
</span>
@enderror
</div>
...
...
@@ -116,17 +150,17 @@
<div class="
row
justify
-
content
-
left
">
<div class="
col
-
sm
-
6
">
<
label
for
=
"resultado"
class
=
"col-form-label"
>
{{
__
(
'Data do Resultado'
)
}}
</
label
>
<label for="
resultado
" class="
col
-
form
-
label
">{{ __('Data do Resultado
*:
') }}</label>
<input value="
{{
$evento
->
resultado
}}
" id="
resultado
" type="
date
" class="
form
-
control
@
error
(
'resultado'
)
is
-
invalid
@
enderror
" name="
resultado
" value="
{{
old
(
'resultado'
)
}}
" required autocomplete="
resultado
" autofocus>
@error('resultado')
<span class="
invalid
-
feedback
" role="
alert
">
<
strong
>
{{
$message
}}
</
strong
>
<strong>{{
$message
. date('d/m/Y', strtotime(
$ontem
?? '')) . '.'
}}</strong>
</span>
@enderror
</div>
</div>{{-- end inicioRevisao | fimRevisao | inicioResultado | fimResultado--}}
<hr>
<div class="
row
subtitulo
">
<div class="
col
-
sm
-
12
">
<p>Documentos</p>
...
...
@@ -137,12 +171,12 @@
<div class="
row
justify
-
content
-
center
" style="
margin
-
top
:
10
px
">
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<
label
for
=
"pdfEdital"
>
PDF
do
Edital
</
label
>
<label for="
pdfEdital
">PDF do Edital
*:
</label>
<a href="
{{
route
(
'download'
,
[
'file'
=>
$evento
->
pdfEdital
])}}
" target="
_new
" style="
font
-
size
:
20
px
;
color
:
#114048ff;" >
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
<
input
type
=
"file"
class
=
"form-control-file @error('pdfEdital') is-invalid @enderror"
name
=
"pdfEdital"
value
=
"{{ old('pdfEdital') }}"
id
=
"pdfEdital"
>
<
small
>
O
arquivo
selecionado
deve
ser
no
formato
PDF
de
até
x
mb
.
</
small
>
<
small
>
O
arquivo
selecionado
deve
ser
no
formato
PDF
de
até
2
mb
.
</
small
>
@
error
(
'pdfEdital'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
...
...
@@ -153,12 +187,12 @@
<
div
class
=
"col-sm-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"modeloDocumento"
>
Arquivo
com
os
modelos
de
documentos
do
edital
</
label
>
<
label
for
=
"modeloDocumento"
>
Arquivo
com
os
modelos
de
documentos
do
edital
:
</
label
>
<
a
href
=
"{{route('download', ['file' =>
$evento->modeloDocumento
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
<
input
type
=
"file"
class
=
"form-control-file @error('modeloDocumento') is-invalid @enderror"
name
=
"modeloDocumento"
value
=
"{{ old('modeloDocumento') }}"
id
=
"modeloDocumento"
>
<
small
>
O
arquivo
selecionado
deve
ter
até
x
mb
.
</
small
>
<
small
>
O
arquivo
selecionado
deve
ter
até
2
mb
.
</
small
>
@
error
(
'modeloDocumento'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
...
...
@@ -170,12 +204,13 @@
<
div
class
=
"row justify-content-center"
style
=
"margin: 20px 0 20px 0"
>
<
div
class
=
"col-md-6"
style
=
"padding-left:0"
>
<
a
class
=
"btn btn-secondary botao-form"
href
=
"
{
{route('
coord.home
')}
}
"
>
Volt
ar
</
a
>
<
a
class
=
"btn btn-secondary botao-form"
href
=
"{{
route('
admin.editais
')
}}"
style
=
"width:100%"
>
Cancel
ar
</
a
>
</
div
>
<
div
class
=
"col-md-6"
style
=
"padding-ri
d
ht:0"
>
<
button
type
=
"submit"
class
=
"btn btn-primary botao-form"
>
{{
__
(
'Salvar
Edital
'
)
}}
<
div
class
=
"col-md-6"
style
=
"padding-ri
g
ht:0"
>
<
button
type
=
"submit"
class
=
"btn btn-primary botao-form"
style
=
"width:100%"
>
{{
__
(
'Salvar'
)
}}
</
button
>
</
div
>
</
div
>
...
...
resources/views/evento/submeterTrabalho.blade.php
View file @
854bd537
...
...
@@ -16,7 +16,7 @@
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"nomeProjeto"
class
=
"col-form-label"
>
{{
__
(
'Nome do Projeto*:'
)
}}
</
label
>
<
input
id
=
"nomeProjeto"
type
=
"text"
class
=
"form-control @error('nomeProjeto') is-invalid @enderror"
name
=
"nomeProjeto"
value
=
"{{ old('nomeProjeto')
}}"
required
autocomplete
=
"nomeProjeto"
autofocus
>
<
input
id
=
"nomeProjeto"
type
=
"text"
class
=
"form-control @error('nomeProjeto') is-invalid @enderror"
name
=
"nomeProjeto"
value
=
"{{ old('nomeProjeto')
!== null ? old('nomeProjeto') : (isset(
$rascunho
) ?
$rascunho->titulo
: '')}}"
autocomplete
=
"nomeProjeto"
autofocus
>
@
error
(
'nomeProjeto'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
...
...
@@ -33,7 +33,8 @@
<
select
class
=
"form-control @error('grandeArea') is-invalid @enderror"
id
=
"grandeArea"
name
=
"grandeArea"
onchange
=
"areas()"
>
<
option
value
=
""
disabled
selected
hidden
>--
Grande
Área
--</
option
>
@
foreach
(
$grandeAreas
as
$grandeArea
)
<
option
@
if
(
old
(
'grandeArea'
)
==
$grandeArea
->
id
)
selected
@
endif
value
=
"
{
{$grandeArea->id}}">{{$grandeArea->nome}
}
</option>
<
option
@
if
(
old
(
'grandeArea'
)
!==
null
?
old
(
'grandeArea'
)
:
(
isset
(
$rascunho
)
?
$rascunho
->
grande_area_id
:
''
)
==
$grandeArea
->
id
)
selected
@
endif
value
=
"
{
{$grandeArea->id}}">{{$grandeArea->nome}
}
</option>
@endforeach
</select>
...
...
@@ -49,7 +50,8 @@
<select class="
form
-
control
@
error
(
'area'
)
is
-
invalid
@
enderror
" id="
area
" name="
area
" onchange="
subareas
()
">
<option value="" disabled selected hidden>-- Área --</option>
{{-- @foreach(
$areas
as
$area
)
<option @if(old('area')==
$area->id
) selected @endif value="
{{
$area
->
id
}}
">
{
{$area->nome}
}
</option>
<option @if(old('area') !== null ? old('area') : (isset(
$rascunho
) ?
$rascunho->area_id
: '')
==
$area->id
) selected @endif value="
{{
$area
->
id
}}
">
{
{$area->nome}
}
</option>
@endforeach --}}
</select>
...
...
@@ -65,7 +67,8 @@
<select class="
form
-
control
@
error
(
'subArea'
)
is
-
invalid
@
enderror
" id="
subArea
" name="
subArea
">
<option value="" disabled selected hidden>-- Sub Área --</option>
{{-- @foreach(
$subAreas
as
$subArea
)
<option @if(old('subArea')==
$subArea->id
) selected @endif value="
{{
$subArea
->
id
}}
">
{
{$subArea->nome}
}
</option>
<option @if(old('subArea') !== null ? old('subArea') : (isset(
$rascunho
) ?
$rascunho->sub_area_id
: '')
==
$subArea->id
) selected @endif value="
{{
$subArea
->
id
}}
">
{
{$subArea->nome}
}
</option>
@endforeach --}}
</select>
...
...
@@ -104,7 +107,8 @@
</div>
<div class="
col
-
sm
-
6
">
<label for="
pontuacaoPlanilha
" class="
col
-
form
-
label
">{{ __('Pontuação da Planilha de Pontuação*:') }}</label>
<input class="
form
-
control
@
error
(
'pontuacaoPlanilha'
)
is
-
invalid
@
enderror
" type="
text
" name="
pontuacaoPlanilha
" value="
{{
old
(
'pontuacaoPlanilha'
)}}
">
<input class="
form
-
control
@
error
(
'pontuacaoPlanilha'
)
is
-
invalid
@
enderror
" type="
text
" name="
pontuacaoPlanilha
"
value="
{{
old
(
'pontuacaoPlanilha'
)
!==
null
?
old
(
'pontuacaoPlanilha'
)
:
(
isset
(
$rascunho
)
?
$rascunho
->
pontuacaoPlanilha
:
''
)}}
">
@error('pontuacaoPlanilha')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
...
...
@@ -114,7 +118,8 @@
</div>
<div class="
col
-
sm
-
6
">
<label for="
linkGrupo
" class="
col
-
form
-
label
">{{ __('Link do grupo de pesquisa*:') }}</label>
<input class="
form
-
control
@
error
(
'linkGrupo'
)
is
-
invalid
@
enderror
" type="
text
" name="
linkGrupo
" value="
{{
old
(
'linkGrupo'
)}}
">
<input class="
form
-
control
@
error
(
'linkGrupo'
)
is
-
invalid
@
enderror
" type="
text
" name="
linkGrupo
"
value="
{{
old
(
'linkGrupo'
)
!==
null
?
old
(
'linkGrupo'
)
:
(
isset
(
$rascunho
)
?
$rascunho
->
linkGrupoPesquisa
:
''
)}}
">
@error('linkGrupo')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
...
...
@@ -133,7 +138,7 @@
{{-- Arquivo --}}
<div class="
col
-
sm
-
6
">
<label for="
anexoProjeto
" class="
col
-
form
-
label
">{{ __('Anexo Projeto*:') }}</label>
@if(old('anexoProjetoPreenchido') != null)
@if(old('anexoProjetoPreenchido') != null
|| (isset(
$rascunho
) &&
$rascunho->anexoProjeto
!= "")
)
<a id="
anexoProjetoTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoProjeto'
])}}
">Arquivo atual</a>
@endif
...
...
@@ -154,7 +159,7 @@
<div class="
col
-
sm
-
6
">
<label for="
anexoLattesCoordenador
" class="
col
-
form
-
label
">{{ __('Anexo do Lattes do Coordenador*:') }}</label>
@if(old('anexoLattesPreenchido') != null)
@if(old('anexoLattesPreenchido') != null
|| (isset(
$rascunho
) &&
$rascunho->anexoLattesCoordenador
!= "")
)
<a id="
anexoLattesTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoLattesCoordenador'
])}}
">Arquivo atual</a>
@endif
...
...
@@ -186,7 +191,7 @@
</span>
@enderror
<br/>
@if(old('anexoComitePreenchido') != null)
@if(old('anexoComitePreenchido') != null
|| (isset(
$rascunho
) &&
$rascunho->anexoAutorizacaoComiteEtica
!= "" &&
$rascunho->anexoAutorizacaoComiteEtica
!= null)
)
<a id="
anexoComiteTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoAutorizacaoComiteEtica'
])}}
">Arquivo atual</a>
@endif
...
...
@@ -207,7 +212,7 @@
<div class="
col
-
sm
-
6
mt
-
3
">
<label for="
anexoPlanilha
" class="
col
-
form
-
label
">{{ __('Anexo do Planilha de Pontuação*:') }}</label>
@if(old('anexoPlanilhaPreenchido') != null)
@if(old('anexoPlanilhaPreenchido') != null
|| (isset(
$rascunho
) &&
$rascunho->anexoPlanilhaPontuacao
!= "")
)
<a id="
anexoPlanilhaTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoPlanilhaPontuacao'
])}}
">Arquivo atual</a>
@endif
...
...
@@ -228,7 +233,7 @@
<div class="
col
-
sm
-
6
">
<label for="
nomeTrabalho
" class="
col
-
form
-
label
">{{ __('Justificativa*:') }}</label>
@if(old('anexoJustificativaPreenchido') != null)
@if(old('anexoJustificativaPreenchido') != null
|| (isset(
$rascunho
) &&
$rascunho->justificativaAutorizacaoEtica
!= "" &&
$rascunho->justificativaAutorizacaoEtica
!= null)
)
<a id="
anexoJustificativaTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'justificativaAutorizacaoEtica'
])}}
">Arquivo atual</a>
@endif
...
...
@@ -252,7 +257,7 @@
{{-- Decisão do CONSU --}}
<div class="
col
-
sm
-
6
">
<label for="
anexoCONSU
" class="
col
-
form
-
label
">{{ __('Decisão do CONSU*:') }}</label>
@if(old('anexoConsuPreenchido') != null)
@if(old('anexoConsuPreenchido') != null
|| (isset(
$rascunho
) &&
$rascunho->anexoDecisaoCONSU
!= "" &&
$rascunho->anexoDecisaoCONSU
!= null)
)
<a id="
anexoConsuTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoDecisaoCONSU'
])}}
">Arquivo atual</a>
@endif
...
...
@@ -276,7 +281,7 @@
</div>
<hr>
<h
4
>Participantes</h
4
>
<h
3
>Participantes</h
3
>
{{-- Participantes --}}
<div class="
row
" style="
margin
-
top
:
20
px
">
...
...
@@ -292,11 +297,11 @@
@for (
$i
= 0;
$i
<
$countParticipante
;
$i
++)
<div id="
novoParticipante
" style="
display
:
block
;
">
<br>
<h
5
>Dados do participante</h
5
>
<h
4
>Dados do participante</h
4
>
<div class="
row
">
<div class="
col
-
sm
-
5
">
<label>Nome Completo*</label>
<input type="
text
" style="
margin
-
bottom
:
10
px
" class="
form
-
control
@
error
(
'nomeParticipante'
)
is
-
invalid
@
enderror
" name="
nomeParticipante
[]
" placeholder="
Nome
"
required
value="
{{
old
(
'nomeParticipante.'
.
$i
)}}
">
<input type="
text
" style="
margin
-
bottom
:
10
px
" class="
form
-
control
@
error
(
'nomeParticipante'
)
is
-
invalid
@
enderror
" name="
nomeParticipante
[]
" placeholder="
Nome
" value="
{{
old
(
'nomeParticipante.'
.
$i
)}}
">
@error('nomeParticipante')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
...
...
@@ -305,7 +310,7 @@
</div>
<div class="
col
-
sm
-
4
">
<label>E-mail*</label>
<input type="
email
" style="
margin
-
bottom
:
10
px
" class="
form
-
control
@
error
(
'emailParticipante'
)
is
-
invalid
@
enderror
" name="
emailParticipante
[]
" placeholder="
email
"
required
value="
{{
old
(
'emailParticipante.'
.
$i
)}}
">
<input type="
email
" style="
margin
-
bottom
:
10
px
" class="
form
-
control
@
error
(
'emailParticipante'
)
is
-
invalid
@
enderror
" name="
emailParticipante
[]
" placeholder="
email
" value="
{{
old
(
'emailParticipante.'
.
$i
)}}
">
@error('emailParticipante')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
...
...
@@ -388,14 +393,17 @@
</
p
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-md-6"
>
<
a
href
=
"
{
{route('evento.visualizar',['id'=>$edital->id])}
}
"
class
=
"btn btn-secondary"
style
=
"width:100%"
>
Cancelar
</
a
>
</
div
>
<
div
class
=
"col-md-6"
>
<
button
type
=
"submit"
formaction
=
"
{
{route('trabalho.storeParcial')}
}
"
class
=
"btn btn-primary"
style
=
"width:100%;margin-bottom:10px"
>
{{
__
(
'Salvar como Rascunho'
)
}}
</
button
>
</
div
>
<
div
class
=
"col-md-6"
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
style
=
"width:100%"
>
{{
__
(
'Enviar'
)
}}
{{
__
(
'Enviar
Projeto
'
)
}}
</
button
>
</
div
>
</
div
>
</
div
>
<
a
href
=
"
{
{route('evento.visualizar',['id'=>$edital->id])}
}
"
class
=
"btn btn-secondary"
style
=
"width:100%"
>
Cancelar
</
a
>
</
form
>
</
div
>
</
div
>
...
...
@@ -485,14 +493,12 @@
$
(
document
)
.
on
(
'click'
,
'.simPlano'
,
function
(
e
)
{
e
.
preventDefault
();
var
plano
=
$
(
this
)
.
next
()
.
next
()[
0
];
plano
.
style
.
display
=
'block'
;
console
.
log
(
'button sim'
);
plano
.
style
.
display
=
'block'
;
});
$
(
document
)
.
on
(
'click'
,
'.naoPlano'
,
function
(
e
)
{
e
.
preventDefault
();
var
plano
=
$
(
this
)
.
next
()[
0
];
plano
.
style
.
display
=
'none'
;
console
.
log
(
'button nao'
);
});
});
...
...
@@ -544,11 +550,11 @@
function
montarLinhaInput
()
{
return
"<div id="
+
"novoParticipante"
+
">"
+
"<br><h
5
>Dados do participante</h
5
>"
+
"<br><h
4
>Dados do participante</h
4
>"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"col-sm-5"
+
">"
+
"<label>Nome Completo*</label>"
+
"<input"
+
" type="
+
'text'
+
" style="
+
"margin-bottom:10px"
+
" class="
+
'form-control'
+
" @error('nomeParticipante') is-invalid @enderror"
+
"name="
+
'nomeParticipante[]'
+
" placeholder="
+
"Nome"
+
"
required
>"
+
"<input"
+
" type="
+
'text'
+
" style="
+
"margin-bottom:10px"
+
" class="
+
'form-control'
+
" @error('nomeParticipante') is-invalid @enderror"
+
"name="
+
'nomeParticipante[]'
+
" placeholder="
+
"Nome"
+
">"
+
"@error('nomeParticipante')"
+
"<span class='invalid-feedback'"
+
"role='alert'"
+
"style='overflow: visible; display:block'>"
+
"<strong>{{
$message
}}</strong>"
+
...
...
@@ -557,7 +563,7 @@
"</div>"
+
"<div class="
+
"col-sm-4"
+
">"
+
"<label>E-mail*</label>"
+
"<input type='email'"
+
"style='margin-bottom:10px'"
+
"class="
+
"form-control @error('emailParticipante') is-invalid @enderror"
+
"name='emailParticipante[]'"
+
"placeholder='email'
required
>"
+
"<input type='email'"
+
"style='margin-bottom:10px'"
+
"class="
+
"form-control @error('emailParticipante') is-invalid @enderror"
+
"name='emailParticipante[]'"
+
"placeholder='email' >"
+
"@error('emailParticipante')"
+
"<span class='invalid-feedback'"
+
"role='alert'"
+
"style='overflow: visible; display:block'>"
+
"<strong>{{
$message
}}</strong>"
+
...
...
@@ -702,8 +708,7 @@
})
}
function
exibirAnexoTemp
(
file
){
console
.
log
(
file
.
id
);
function
exibirAnexoTemp
(
file
){
if
(
file
.
id
===
"anexoProjeto"
){
var
anexoProjetoPreenchido
=
document
.
getElementById
(
'anexoProjetoPreenchido'
);
anexoProjetoPreenchido
.
value
=
"sim"
;
...
...
resources/views/evento/visualizarEvento.blade.php
View file @
854bd537
...
...
@@ -123,6 +123,38 @@
</
div
>
</
div
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
table
class
=
"table table-responsive-lg table-hover"
>
<
thead
>
<
tr
>
<
th
style
=
"text-align:center"
>
Edital
</
th
>
<
th
style
=
"text-align:center"
>
Modelos
</
th
>
</
tr
>
</
thead
>
<
tbody
>
<
tr
>
<
td
style
=
"text-align:center"
>
<
a
href
=
"{{route('baixar.edital', ['id' =>
$evento->id
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
</
td
>
<
td
style
=
"text-align:center"
>
@
if
(
$evento
->
modeloDocumento
!=
null
)
<
a
href
=
"{{route('baixar.modelos', ['id' =>
$evento->id
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
@
else
O
criador
do
edital
não
disponibilizou
modelos
@
endif
</
td
>
</
tr
>
</
tbody
>
</
table
>
</
div
>
</
div
>
@
if
(
$hasFile
==
true
)
<
div
class
=
"row margin"
>
<
div
class
=
"col-sm-12"
>
...
...
@@ -148,7 +180,7 @@
<
tr
>
<
th
>
Título
</
th
>
<
th
style
=
"text-align:center"
>
Baixar
</
th
>
<
th
style
=
"text-align:center"
>
Nova
Versão
</
th
>
{{
--
<
th
style
=
"text-align:center"
>
Nova
Versão
</
th
>
--
}}
</
tr
>
</
thead
>
<
tbody
>
...
...
@@ -164,11 +196,11 @@
}
@
endphp
@
endforeach
<
a
href
=
"{{route('
download
', ['
file
' =>
$
arquivo
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
a
href
=
"{{route('
baixar.anexo.projeto
', ['
id
' =>
$
trabalho->id
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
</
td
>
<
td
style
=
"text-align:center"
>
{{
--
<
td
style
=
"text-align:center"
>
@
if
(
$evento
->
inicioSubmissao
<=
$mytime
)
@
if
(
$mytime
<
$evento
->
fimSubmissao
)
<
a
href
=
"#"
onclick
=
"changeTrabalho(
{
{$trabalho->id}
}
)"
data
-
toggle
=
"modal"
data
-
target
=
"#modalTrabalho"
style
=
"color:#114048ff"
>
...
...
@@ -176,7 +208,7 @@
</
a
>
@
endif
@
endif
</
td
>
</
td
>
--
}}
</
tr
>
@
endforeach
</
tbody
>
...
...
resources/views/index.blade.php
View file @
854bd537
...
...
@@ -16,35 +16,39 @@
</
p
>
</
div
>
<
div
class
=
"row position-text"
>
<
button
class
=
"btn btn-opcoes-edital"
style
=
"margin-bottom: 20px;"
>
{{
--
<
button
class
=
"btn btn-opcoes-edital"
style
=
"margin-bottom: 20px;"
>
Leia
mais
</
button
>
</
button
>
--
}}
</
div
>
</
div
>
<
br
>
<
div
class
=
"col-sm-6"
style
=
" position: relative; top: 50px; padding: 25px;"
>
<
h4
style
=
"color: rgb(0, 140, 255);"
>
Editais
</
h4
>
<
div
id
=
"editais"
>
<
ul
class
=
"list-editais flexcroll"
style
=
"list-style-type: none;"
>
<
ul
class
=
"
col-sm-12
list-editais flexcroll"
style
=
"list-style-type: none;"
>
@
foreach
(
$eventos
as
$evento
)
<
li
class
=
"li-editais"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-1"
>
<
img
class
=
"img-arquivo"
src
=
"{{ asset('img/icons/logo_arquivo.png') }}"
alt
=
""
>
</
div
>
<
div
class
=
"col-sm-8"
>
<
div
>
{{
$evento
->
nome
}}
</
div
>
<
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"
style
=
"margin-left: 15px;"
>
Opções
</
button
>
@
if
(
\
Carbon\Carbon
::
create
(
$evento
->
fimSubmissao
)
>
\
Carbon\Carbon
::
create
(
$hoje
))
<
li
class
=
"col-sm-12 li-editais"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-1"
>
<
img
class
=
"img-arquivo"
src
=
"{{ asset('img/icons/logo_arquivo.png') }}"
alt
=
""
>
</
div
>
<
div
class
=
"col-sm-8"
>
<
div
>
{{
$evento
->
nome
}}
</
div
>
<
div
class
=
"color-subtitle-edital"
>
Submissão
até
o
dia
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
fimSubmissao
))
}}
</
div
>
</
div
>
<
div
class
=
"col-sm-3"
>
<
a
href
=
"{{ route('evento.visualizarNaoLogado', ['id' =>
$evento->id
]) }}"
>
<
button
class
=
"btn btn-opcoes-edital"
style
=
"float: left;"
>
Visualizar
</
button
>
</
a
>
</
div
>
</
div
>
</
div
>
</
div
>
</
li
>
</
li
>
@
endif
@
endforeach
</
div
>
</
div
>
...
...
resources/views/layouts/app.blade.php
View file @
854bd537
...
...
@@ -36,7 +36,7 @@
</div>
<div
class=
"navbar-text"
>
@guest
<a
href=
"
#
"
class=
"btn navbar-text negrito"
style=
"color: rgb(0, 140, 255);"
>
Editais
</a>
<a
href=
"
{{ route('coord.home') }}
"
class=
"btn navbar-text negrito"
style=
"color: rgb(0, 140, 255);"
>
Editais
</a>
<a
href=
"#"
class=
"btn dropdown-toggle negrito"
role=
"button"
id=
"dropdownMenuLink"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
style=
"color: rgb(0, 140, 255);"
>
Login
</a>
<div
class=
"dropdown-menu dropdown-menu-right negrito"
aria-labelledby=
"dropdownMenuLink"
style=
"right: 15%; width: 300px; height: 380px;"
>
<form
method=
"POST"
action=
"{{ route('login') }}"
>
...
...
resources/views/projeto/editar.blade.php
View file @
854bd537
...
...
@@ -266,7 +266,8 @@
</div>
<hr>
<h4>Participantes</h4>
<h3>Participantes</h3>
<input type="
hidden
" value="
{{
sizeof
(
$participantes
)}}
" id="
qtdParticipantes
">
{{-- Participantes --}}
<div class="
row
" style="
margin
-
top
:
20
px
">
...
...
@@ -277,7 +278,7 @@
@if(
$participante->user_id
===
$user->id
)
<div id="
novoParticipante
">
<br>
<h
5
>Dados do participante</h
5
>
<h
4
>Dados do participante</h
4
>
<div class="
row
">
<div class="
col
-
sm
-
5
">
<label>Nome Completo</label>
...
...
@@ -316,10 +317,25 @@
@enderror
</select>
</div>
</div>
<div class="
row
">
<div class='col-sm-11'>
<h6 class="
mb
-
1
">Possui plano de trabalho?</h6>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
simPlano
" id="
simPlano
">Sim</button>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
naoPlano
">Não</button>
<input type="
hidden
" name="
semPlano
[]
" value="">
</div>
<div class="
col
-
sm
-
1
deletarSemPlano
" >
<a class="
delete
">
<img src="
/
img
/
icons
/
user
-
times
-
solid
.
svg
" style="
width
:
25
px
;
margin
-
top
:
35
px
">
</a>
</div>
</div>
<
h5>Dados do plano de trabalho</h5>
<
div id="
planoHabilitado
" >
@foreach (
$arquivos
as
$arquivo
)
@if(
$arquivo->participanteId
===
$participante->id
)
<input type="
hidden
" class="
exibirPlano
">
<h5>Dados do plano de trabalho</h5>
<a href="
{{
route
(
'baixar.plano'
,
[
'id'
=>
$arquivo
->
id
])
}}
">Plano de trabalho atual</a>
<div class="
row
">
<div class="
col
-
sm
-
12
">
...
...
@@ -365,10 +381,11 @@
@endif
@endforeach
</div>
</div>
@endif
@endforeach
@endforeach
</div>
</div>
<a href="
#" class="btn btn-primary" id="addCoautor" style="width:100%;margin-top:10px">Participantes +</a>
</
div
>
</
div
>
...
...
@@ -397,7 +414,7 @@
<
script
type
=
"text/javascript"
>
$
(
function
()
{
var
qtdLinhas
=
1
;
var
qtdParticipantes
=
1
;
var
qtdParticipantes
=
$
(
'#qtdParticipantes'
)
.
val
()
;
// Coautores
$
(
'#addCoautor'
)
.
click
(
function
(
e
)
{
if
(
qtdParticipantes
<
100
)
{
...
...
@@ -408,20 +425,22 @@
}
});
$
(
'#addPlanoTrabalho'
)
.
click
(
function
(
e
)
{
e
.
preventDefault
();
if
(
qtdLinhas
<
4
)
{
linha
=
montarLinhaInputPlanoTrabalho
();
$
(
'#planoTrabalho'
)
.
append
(
linha
);
qtdLinhas
++
;
}
// $('#addPlanoTrabalho').click(function(e) {
// e.preventDefault();
// if (qtdLinhas < 4) {
// linha = montarLinhaInputPlanoTrabalho();
// $('#planoTrabalho').append(linha);
// qtdLinhas++;
// }
});
//
});
// Exibir modalidade de acordo com a área
// $("#area").change(function() {
// console.log($(this).val());
// addModalidade($(this).val());
// });
$
(
document
)
.
on
(
'click'
,
'.delete'
,
function
()
{
if
(
qtdParticipantes
>
1
)
{
qtdParticipantes
--
;
...
...
@@ -442,7 +461,7 @@
//replace the "Choose a file" label
$
(
this
)
.
next
(
'#custom-file-label'
)
.
html
(
fileName
);
})
// F
$
(
'#buttonSim'
)
.
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
false
);
...
...
@@ -451,8 +470,52 @@
$
(
'#buttonNao'
)
.
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
true
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
false
);
console
.
log
(
'button nao'
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
false
);
});
// Habilitando / desabilitando plano de trabalho
$
(
'.simPlano'
)
.
click
(
function
(
e
)
{
e
.
preventDefault
();
var
possuiPlano
=
$
(
this
)
.
parent
()
.
parent
()
.
next
();
//se o participante não tem plano, adicionar; se ele já tem, apenas exibir
if
(
possuiPlano
[
0
]
.
firstElementChild
==
null
){
linha
=
linhaPlanoTrabalho
();
possuiPlano
.
append
(
linha
);
possuiPlano
[
0
]
.
style
.
display
=
'block'
;
}
else
if
(
possuiPlano
[
0
]
.
firstElementChild
.
className
==
'exibirPlano'
){
possuiPlano
[
0
]
.
style
.
display
=
'block'
;
}
//esconder a imagem de deletar
deletar
=
$
(
this
)
.
parent
()
.
next
()[
0
];
deletar
.
style
.
display
=
"none"
;
});
// se não há plano de trabalho, esconder a div planoHabilitado e exibir imagem de deletar
$
(
document
)
.
on
(
'click'
,
'.naoPlano'
,
function
(
e
)
{
e
.
preventDefault
();
var
plano
=
$
(
this
)
.
parent
()
.
parent
()
.
next
()[
0
];
plano
.
style
.
display
=
'none'
;
deletar
=
$
(
this
)
.
parent
()
.
next
()[
0
]
deletar
.
style
.
display
=
"block"
;
//comunicar ao controller para deletar somente o plano
$
(
this
)
.
next
()
.
val
(
'sim'
);
});
//se há plano de trabalho, esconder a imagem de deletar
$
(
function
()
{
var
simPlano
=
document
.
getElementsByClassName
(
'simPlano'
);
for
(
var
i
=
0
;
i
<
simPlano
.
length
;
i
++
){
var
planoHabilitado
=
simPlano
[
i
]
.
parentElement
.
parentElement
.
nextElementSibling
;
if
(
planoHabilitado
.
firstElementChild
!=
null
&&
planoHabilitado
.
firstElementChild
.
className
==
'exibirPlano'
){
simPlano
[
i
]
.
parentElement
.
nextElementSibling
.
style
.
display
=
"none"
;
}
}
});
});
// Remover Coautor
...
...
@@ -471,7 +534,7 @@
function
montarLinhaInput
()
{
return
"<div id="
+
"novoParticipante"
+
">"
+
"<br><h
5
>Dados do participante</h
5
>"
+
"<br><h
4
>Dados do participante</h
4
>"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"col-sm-5"
+
">"
+
"<label>Nome Completo</label>"
+
...
...
@@ -578,6 +641,46 @@
// "</div>";
// }
function
linhaPlanoTrabalho
(){
return
"<input"
+
" type="
+
"hidden"
+
" class="
+
"exibirPlano"
+
">"
+
"<h5>Dados do plano de trabalho</h5>"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"col-sm-4"
+
">"
+
"<label>Titulo*</label>"
+
"<input"
+
" type="
+
'text'
+
" style="
+
"margin-bottom:10px"
+
" class="
+
"form-control @error('nomePlanoTrabalho') is-invalid @enderror"
+
" name="
+
'nomePlanoTrabalho[]'
+
" placeholder="
+
"Nome"
+
">"
+
"@error('nomePlanoTrabalho')"
+
"<span class='invalid-feedback'"
+
"role='alert'"
+
"style='overflow: visible; display:block'>"
+
"<strong>{{
$message
}}</strong>"
+
"</span>"
+
"@enderror"
+
"</div>"
+
"<div class="
+
"col-sm-7"
+
">"
+
"<label for="
+
"nomeTrabalho"
+
">Anexo* </label>"
+
"<div class="
+
"input-group"
+
">"
+
"<div class='input-group-prepend'>"
+
"<span class='input-group-text' id='inputGroupFileAddon01'>Selecione um arquivo:</span>"
+
"</div>"
+
"<div class='custom-file'>"
+
"<input type='file' class='custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror"
+
"id='inputGroupFile01'"
+
"aria-describedby='inputGroupFileAddon01' name='anexoPlanoTrabalho[]'>"
+
"<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('anexoPlanoTrabalho')"
+
"<span class='invalid-feedback' role='alert' style='overflow: visible; display:block'>"
+
"<strong>{{
$message
}}</strong>"
+
"</span>"
+
"@enderror"
+
"</div>"
+
"<div class="
+
"col-sm-1"
+
">"
+
"<a class="
+
"delete"
+
">"
+
"<img src="
+
"/img/icons/user-times-solid.svg"
+
" style="
+
"width:25px;margin-top:35px"
+
">"
+
"</a>"
+
"</div>"
+
"</div>"
;
}
function
areas
()
{
var
grandeArea
=
$
(
'#grandeArea'
)
.
val
();
$
.
getJSON
(
"{{ config('app.url') }}/naturezas/areas/"
+
grandeArea
,
...
...
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