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
46fcda2f
"resources/views/git@sites.upe.br:walter.felipe/submeta.git" did not exist on "b5439ad35e04159e8ae30e206100620aa76b330a"
Commit
46fcda2f
authored
Mar 21, 2022
by
Jose Fernando Mendes da Costa
Browse files
conflito
parents
bfdee197
c57f3a05
Changes
15
Hide whitespace changes
Inline
Side-by-side
app/DocumentacaoComplementar.php
deleted
100644 → 0
View file @
bfdee197
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
DocumentacaoComplementar
extends
Model
{
protected
$fillable
=
[
'termoCompromisso'
,
'comprovanteMatricula'
,
'linkLattes'
,
'pdfLattes'
,
'participante_id'
,
];
public
function
participante
(){
return
$this
->
belongsTo
(
Participante
::
class
,
'participante_id'
,
'id'
);
}
}
app/Evento.php
View file @
46fcda2f
...
...
@@ -16,7 +16,8 @@ class Evento extends Model
'inicioSubmissao'
,
'fimSubmissao'
,
'inicioRevisao'
,
'fimRevisao'
,
'resultado_final'
,
'resultado_preliminar'
,
'coordenadorId'
,
'numMaxTrabalhos'
,
'numMaxCoautores'
,
'hasResumo'
,
'criador_id'
,
'numParticipantes'
,
'dt_inicioRelatorioParcial'
,
'dt_fimRelatorioParcial'
,
'dt_inicioRelatorioFinal'
,
'dt_fimRelatorioFinal'
'dt_inicioRelatorioParcial'
,
'dt_fimRelatorioParcial'
,
'dt_inicioRelatorioFinal'
,
'dt_fimRelatorioFinal'
,
'formAvaliacaoExterno'
,
'formAvaliacaoInterno'
];
public
function
endereco
(){
...
...
app/Http/Controllers/AdministradorController.php
View file @
46fcda2f
...
...
@@ -28,6 +28,7 @@ use Illuminate\Support\Facades\Mail;
use
App\Mail\EventoCriado
;
use
Illuminate\Support\Facades\Storage
;
use
App\Http\Controllers\Response
;
use
App\Mail\EmailLembrete
;
use
Illuminate\Pagination\Paginator
;
use
Illuminate\Support\Collection
;
use
Illuminate\Pagination\LengthAwarePaginator
;
...
...
@@ -532,7 +533,23 @@ class AdministradorController extends Controller
$trabalho
=
Trabalho
::
where
(
'id'
,
$request
->
trabalho_id
)
->
first
();
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$avaliadores
=
Avaliador
::
whereIn
(
'id'
,
$request
->
avaliadores_id
)
->
get
();
if
(
$request
->
avaliadores_internos_id
==
null
){
$avaliadoresInternos
=
[];
}
else
{
$avaliadoresInternos
=
$request
->
avaliadores_internos_id
;
}
if
(
$request
->
avaliadores_externos_id
==
null
){
$avaliadoresExternos
=
[];
}
else
{
$avaliadoresExternos
=
$request
->
avaliadores_externos_id
;
}
$idsAvaliadores
=
array_merge
(
$avaliadoresInternos
,
$avaliadoresExternos
);
if
(
$idsAvaliadores
==
null
){
redirect
()
->
back
()
->
with
([
'error'
=>
'Selecione ao menos um avaliador.'
,
'trabalho'
=>
$trabalho
->
id
]);
}
$avaliadores
=
Avaliador
::
whereIn
(
'id'
,
$idsAvaliadores
)
->
get
();
$trabalho
->
avaliadors
()
->
attach
(
$avaliadores
);
$evento
->
avaliadors
()
->
syncWithoutDetaching
(
$avaliadores
);
$trabalho
->
save
();
...
...
@@ -553,6 +570,33 @@ class AdministradorController extends Controller
}
public
function
reenviarConviteAtribuicaoProjeto
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$avaliador
=
Avaliador
::
where
(
'id'
,
$request
->
avaliador_id
)
->
first
();
if
(
$avaliador
->
user
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
!=
true
){
$avaliador
->
user
->
avaliadors
->
eventos
()
->
updateExistingPivot
(
$evento
->
id
,
[
'convite'
=>
null
]);
}
$notificacao
=
Notificacao
::
create
([
'remetente_id'
=>
Auth
::
user
()
->
id
,
'destinatario_id'
=>
$avaliador
->
user_id
,
'trabalho_id'
=>
$request
->
trabalho_id
,
'lido'
=>
false
,
'tipo'
=>
5
,
]);
$notificacao
->
save
();
$trabalho
=
Trabalho
::
where
(
'id'
,
$request
->
trabalho_id
)
->
first
();
$subject
=
"Trabalho atribuido"
;
$informacoes
=
$trabalho
->
titulo
;
//REFAZER EMAIL
Mail
::
to
(
$avaliador
->
user
->
email
)
->
send
(
new
EmailLembrete
(
$avaliador
->
user
,
$subject
,
$informacoes
));
return
redirect
()
->
back
();
}
public
function
enviarConvite
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
...
...
@@ -562,6 +606,14 @@ class AdministradorController extends Controller
$area
=
Area
::
where
(
'id'
,
$request
->
area_id
)
->
first
();
$user
=
User
::
where
(
'email'
,
$emailAvaliador
)
->
first
();
if
(
$request
->
instituicao
==
"ufape"
){
$nomeInstituicao
=
"Universidade Federal do Agreste de Pernambuco"
;
$externoInterno
=
"Interno"
;
}
else
{
$nomeInstituicao
=
$request
->
outra
;
$externoInterno
=
"Externo"
;
}
//existe o caso de enviar o convite de novo para um mesmo usuário
// if(isset($user->avaliadors->eventos->where('id', $evento->id)->first()->pivot->convite) ){
// return redirect()->back()->with(['mensagem' => 'Usuário já recebeu um convite e está pendente']);
...
...
@@ -584,6 +636,7 @@ class AdministradorController extends Controller
'usuarioTemp'
=>
false
,
'name'
=>
$nomeAvaliador
,
'tipo'
=>
'avaliador'
,
'instituicao'
=>
$nomeInstituicao
,
]);
$user
->
markEmailAsVerified
();
...
...
@@ -591,6 +644,7 @@ class AdministradorController extends Controller
if
(
$user
->
avaliadors
==
null
){
$avaliador
=
new
Avaliador
();
$avaliador
->
tipo
=
$externoInterno
;
$avaliador
->
save
();
$avaliador
->
area
()
->
associate
(
$area
);
$avaliador
->
user
()
->
associate
(
$user
);
...
...
app/Http/Controllers/DocumentacaoComplementarController.php
View file @
46fcda2f
...
...
@@ -17,9 +17,10 @@ class DocumentacaoComplementarController extends Controller
$docComp
=
DocumentacaoComplementar
::
find
(
$request
->
docId
);
}
else
{
$docComp
=
new
DocumentacaoComplementar
;
$docComp
->
save
();
}
$pasta
=
'docComplementar/'
.
Auth
::
user
()
->
id
;
$pasta
=
'docComplementar/'
.
$docComp
->
id
;
$docComp
->
termoCompromisso
=
Storage
::
putFileAs
(
$pasta
,
$request
->
termoCompromisso
,
"Termo De Compromisso.pdf"
);
$docComp
->
comprovanteMatricula
=
Storage
::
putFileAs
(
$pasta
,
$request
->
comprovanteMatricula
,
"Comprovante De Matricula.pdf"
);
...
...
@@ -27,11 +28,9 @@ class DocumentacaoComplementarController extends Controller
$docComp
->
termoCompromisso
=
Storage
::
putFileAs
(
$pasta
,
$request
->
termoCompromisso
,
"TermoDeCompromisso.pdf"
);
$docComp
->
participante_id
=
$request
->
partcipanteId
;
$docComp
->
linkLattes
=
$request
->
linkLattes
;
if
(
$request
->
docId
!=
null
){
$docComp
->
update
();
}
else
{
$docComp
->
save
();
}
$docComp
->
update
();
return
redirect
()
->
back
()
->
with
([
'sucesso'
=>
"Documentação complementar enviada com sucesso"
]);
...
...
app/Http/Controllers/EventoController.php
View file @
46fcda2f
...
...
@@ -32,18 +32,18 @@ class EventoController extends Controller
public
function
index
(
Request
$request
)
{
if
(
$request
->
buscar
==
null
){
$eventos
=
Evento
::
all
()
->
sortBy
(
'nome'
);
// $comissaoEvento = ComissaoEvento::all();
// $eventos = Evento::where('coordenadorId', Auth::user()->id)->get();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
$eventos
=
Evento
::
all
()
->
sortBy
(
'nome'
);
// $comissaoEvento = ComissaoEvento::all();
// $eventos = Evento::where('coordenadorId', Auth::user()->id)->get();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'coordenador.home'
,[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
,
'palavra'
=>
''
,
'flag'
=>
'false'
]);
return
view
(
'coordenador.home'
,[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
,
'palavra'
=>
''
,
'flag'
=>
'false'
]);
}
else
{
$eventos
=
Evento
::
where
(
'nome'
,
'ilike'
,
'%'
.
$request
->
buscar
.
'%'
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'coordenador.home'
,[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
,
'palavra'
=>
$request
->
buscar
,
'flag'
=>
'true'
]);
$eventos
=
Evento
::
where
(
'nome'
,
'ilike'
,
'%'
.
$request
->
buscar
.
'%'
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'coordenador.home'
,[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
,
'palavra'
=>
$request
->
buscar
,
'flag'
=>
'true'
]);
}
}
...
...
@@ -90,9 +90,9 @@ class EventoController extends Controller
//dd($user_id);
if
(
isset
(
$request
->
modeloDocumento
)){
$request
->
validate
([
'modeloDocumento'
=>
[
'file'
,
'max:2048'
,
new
ExcelRule
(
$request
->
file
(
'modeloDocumento'
))],
]);
$request
->
validate
([
'modeloDocumento'
=>
[
'file'
,
'max:2048'
,
new
ExcelRule
(
$request
->
file
(
'modeloDocumento'
))],
]);
}
//--Salvando os anexos da submissão temporariamente
...
...
@@ -100,62 +100,68 @@ class EventoController extends Controller
// validar datas nulas antes, pois pode gerar um bug
if
(
$request
->
inicioSubmissao
==
null
||
$request
->
fimSubmissao
==
null
||
$request
->
inicioRevisao
==
null
||
$request
->
fimRevisao
==
null
||
$request
->
resultado
==
null
$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'
],
'coordenador_id'
=>
[
'required'
],
'numParticipantes'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
],
'fimSubmissao'
=>
[
'required'
,
'date'
],
'inicioRevisao'
=>
[
'required'
,
'date'
],
'fimRevisao'
=>
[
'required'
,
'date'
],
'inicio_recurso'
=>
[
'required'
,
'date'
],
'fim_recurso'
=>
[
'required'
,
'date'
],
'resultado_final'
=>
[
'required'
,
'date'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
],
'dt_inicioRelatorioParcial'
=>
[
'required'
,
'date'
],
'dt_fimRelatorioParcial'
=>
[
'required'
,
'date'
],
'dt_inicioRelatorioFinal'
=>
[
'required'
,
'date'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
],
'pdfEdital'
=>
[(
$request
->
pdfEditalPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
//'modeloDocumento' => [],
]);
$validatedData
=
$request
->
validate
([
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'coordenador_id'
=>
[
'required'
],
'numParticipantes'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
],
'fimSubmissao'
=>
[
'required'
,
'date'
],
'inicioRevisao'
=>
[
'required'
,
'date'
],
'fimRevisao'
=>
[
'required'
,
'date'
],
'inicio_recurso'
=>
[
'required'
,
'date'
],
'fim_recurso'
=>
[
'required'
,
'date'
],
'resultado_final'
=>
[
'required'
,
'date'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
],
'dt_inicioRelatorioParcial'
=>
[
'required'
,
'date'
],
'dt_fimRelatorioParcial'
=>
[
'required'
,
'date'
],
'dt_inicioRelatorioFinal'
=>
[
'required'
,
'date'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
],
'pdfFormAvalExterno'
=>
[(
$request
->
pdfFormAvalExternoPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalInterno'
=>
[(
$request
->
pdfFormAvalInternoPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
]
,
'pdfFormAvalInterno'
=>
[
'required'
,
'file'
],
'pdfEdital'
=>
[(
$request
->
pdfEditalPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
//'modeloDocumento' => [],
]);
}
// validacao normal
//after = depois
//before = antes
$validatedData
=
$request
->
validate
([
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
,
'max:1500'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'coordenador_id'
=>
[
'required'
],
'numParticipantes'
=>
[
'required'
],
#----------------------------------------------
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after:yesterday'
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:yesterday'
],
'fimRevisao'
=>
[
'required'
,
'date'
,
'after:inicioRevisao'
,
'after:fimSubmissao'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
,
'after_or_equal:fimRevisao'
],
'inicio_recurso'
=>
[
'required'
,
'date'
,
'after_or_equal:resultado_preliminar'
],
'fim_recurso'
=>
[
'required'
,
'date'
,
'after:inicio_recurso'
],
'resultado_final'
=>
[
'required'
,
'date'
,
'after:fim_recurso'
],
'dt_inicioRelatorioParcial'
=>
[
'required'
,
'date'
,
'after:resultado_final'
],
'dt_fimRelatorioParcial'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioParcial'
],
'dt_inicioRelatorioFinal'
=>
[
'required'
,
'date'
,
'after:dt_fimRelatorioParcial'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioFinal'
],
'pdfEdital'
=>
[(
$request
->
pdfEditalPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
//'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'],
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
,
'max:1500'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'coordenador_id'
=>
[
'required'
],
'numParticipantes'
=>
[
'required'
],
#----------------------------------------------
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after:yesterday'
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:yesterday'
],
'fimRevisao'
=>
[
'required'
,
'date'
,
'after:inicioRevisao'
,
'after:fimSubmissao'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
,
'after_or_equal:fimRevisao'
],
'inicio_recurso'
=>
[
'required'
,
'date'
,
'after_or_equal:resultado_preliminar'
],
'fim_recurso'
=>
[
'required'
,
'date'
,
'after:inicio_recurso'
],
'resultado_final'
=>
[
'required'
,
'date'
,
'after:fim_recurso'
],
'dt_inicioRelatorioParcial'
=>
[
'required'
,
'date'
,
'after:resultado_final'
],
'dt_fimRelatorioParcial'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioParcial'
],
'dt_inicioRelatorioFinal'
=>
[
'required'
,
'date'
,
'after:dt_fimRelatorioParcial'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioFinal'
],
'pdfFormAvalExterno'
=>
[(
$request
->
pdfFormAvalExternoPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalInterno'
=>
[(
$request
->
pdfFormAvalInternoPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfEdital'
=>
[(
$request
->
pdfEditalPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
//'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'],
]);
//$evento = Evento::create([
...
...
@@ -197,21 +203,41 @@ class EventoController extends Controller
//-- 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
;
$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
();
$path
=
'modeloDocumento/'
.
$evento
->
id
.
'/'
;
$nome
=
"modelo"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$modeloDocumento
,
$nome
);
$modeloDocumento
=
$request
->
modeloDocumento
;
$extension
=
$modeloDocumento
->
extension
();
$path
=
'modeloDocumento/'
.
$evento
->
id
.
'/'
;
$nome
=
"modelo"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$modeloDocumento
,
$nome
);
$evento
->
modeloDocumento
=
$path
.
$nome
;
}
if
(
isset
(
$request
->
pdfFormAvalInterno
)){
$pdfFormAvalInterno
=
$request
->
pdfFormAvalInterno
;
$extension
=
$pdfFormAvalInterno
->
extension
();
$path
=
'pdfFormAvalInterno/'
.
$evento
->
id
.
'/'
;
$nome
=
"formulario de avaliação interno"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$pdfFormAvalInterno
,
$nome
);
$evento
->
formAvaliacaoInterno
=
$path
.
$nome
;
}
if
(
isset
(
$request
->
pdfFormAvalExterno
)){
$pdfFormAvalExterno
=
$request
->
pdfFormAvalExterno
;
$extension
=
$pdfFormAvalExterno
->
extension
();
$path
=
'pdfFormAvalExterno/'
.
$evento
->
id
.
'/'
;
$nome
=
"formulario de avaliação externo"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$pdfFormAvalExterno
,
$nome
);
$evento
->
modeloDocument
o
=
$path
.
$nome
;
$evento
->
formAvaliacaoExtern
o
=
$path
.
$nome
;
}
$evento
->
update
();
...
...
@@ -226,31 +252,39 @@ class EventoController extends Controller
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
;
//---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
);
}
if
(
!
(
is_null
(
$request
->
pdfFormAvalExterno
))
)
{
$pasta
=
'pdfFormAvalExterno/'
.
$eventoTemp
->
id
;
$eventoTemp
->
formAvaliacaoExterno
=
Storage
::
putFileAs
(
$pasta
,
$request
->
pdfFormAvalExterno
,
'formulario de avaliação externo.pdf'
);
}
if
(
!
(
is_null
(
$request
->
pdfFormAvalInterno
))
)
{
$pasta
=
'pdfFormAvalInterno/'
.
$eventoTemp
->
id
;
$eventoTemp
->
formAvaliacaoInterno
=
Storage
::
putFileAs
(
$pasta
,
$request
->
pdfFormAvalInterno
,
'formulario de avaliação interno.pdf'
);
}
$eventoTemp
->
update
();
return
$eventoTemp
;
}
/**
...
...
@@ -264,20 +298,20 @@ class EventoController extends Controller
$evento
=
Evento
::
find
(
$id
);
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
if
(
$proponente
!=
null
){
$hasTrabalho
=
false
;
$hasFile
=
false
;
$trabalhos
=
$proponente
->
trabalhos
()
->
where
(
'evento_id'
,
$evento
->
id
)
->
get
();
$trabalhosCount
=
$proponente
->
trabalhos
()
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
();
if
(
$trabalhosCount
!=
0
){
$hasTrabalho
=
true
;
$hasFile
=
true
;
}
$hasTrabalho
=
false
;
$hasFile
=
false
;
$trabalhos
=
$proponente
->
trabalhos
()
->
where
(
'evento_id'
,
$evento
->
id
)
->
get
();
$trabalhosCount
=
$proponente
->
trabalhos
()
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
();
if
(
$trabalhosCount
!=
0
){
$hasTrabalho
=
true
;
$hasFile
=
true
;
}
}
else
{
$hasTrabalho
=
false
;
$hasFile
=
false
;
$trabalhos
=
0
;
$trabalhosCount
=
0
;
$hasTrabalho
=
false
;
$hasFile
=
false
;
$trabalhos
=
0
;
$trabalhosCount
=
0
;
}
$trabalhosId
=
Trabalho
::
where
(
'evento_id'
,
$evento
->
id
)
->
select
(
'id'
)
->
get
();
...
...
@@ -285,14 +319,14 @@ class EventoController extends Controller
$mytime
=
Carbon
::
now
(
'America/Recife'
);
// dd(false);
return
view
(
'evento.visualizarEvento'
,
[
'evento'
=>
$evento
,
'trabalhos'
=>
$trabalhos
,
// 'trabalhosCoautor' => $trabalhosCoautor,
'hasTrabalho'
=>
$hasTrabalho
,
// 'hasTrabalhoCoautor' => $hasTrabalhoCoautor,
'hasFile'
=>
$hasFile
,
'mytime'
=>
$mytime
]);
'evento'
=>
$evento
,
'trabalhos'
=>
$trabalhos
,
// 'trabalhosCoautor' => $trabalhosCoautor,
'hasTrabalho'
=>
$hasTrabalho
,
// 'hasTrabalhoCoautor' => $hasTrabalhoCoautor,
'hasFile'
=>
$hasFile
,
'mytime'
=>
$mytime
]);
}
public
function
showNaoLogado
(
$id
)
...
...
@@ -307,14 +341,14 @@ class EventoController extends Controller
$mytime
=
Carbon
::
now
(
'America/Recife'
);
// dd(false);
return
view
(
'evento.visualizarEvento'
,
[
'evento'
=>
$evento
,
'trabalhos'
=>
$trabalhos
,
'trabalhosCoautor'
=>
$trabalhosCoautor
,
'hasTrabalho'
=>
$hasTrabalho
,
'hasTrabalhoCoautor'
=>
$hasTrabalhoCoautor
,
'hasFile'
=>
$hasFile
,
'mytime'
=>
$mytime
]);
'evento'
=>
$evento
,
'trabalhos'
=>
$trabalhos
,
'trabalhosCoautor'
=>
$trabalhosCoautor
,
'hasTrabalho'
=>
$hasTrabalho
,
'hasTrabalhoCoautor'
=>
$hasTrabalhoCoautor
,
'hasFile'
=>
$hasFile
,
'mytime'
=>
$mytime
]);
}
/**
...
...
@@ -332,9 +366,9 @@ class EventoController extends Controller
$yesterday
=
Carbon
::
yesterday
(
'America/Recife'
);
$yesterday
=
$yesterday
->
toDateString
();
return
view
(
'evento.editarEvento'
,[
'evento'
=>
$evento
,
'coordenadores'
=>
$coordenadors
,
'naturezas'
=>
$naturezas
,
'ontem'
=>
$yesterday
]);
'coordenadores'
=>
$coordenadors
,
'naturezas'
=>
$naturezas
,
'ontem'
=>
$yesterday
]);
}
/**
...
...
@@ -351,55 +385,59 @@ class EventoController extends Controller
$yesterday
=
Carbon
::
yesterday
(
'America/Recife'
);
$yesterday
=
$yesterday
->
toDateString
();
if
(
$request
->
inicioSubmissao
==
null
||
$request
->
fimSubmissao
==
null
||
$request
->
inicioRevisao
==
null
||
$request
->
fimRevisao
==
null
||
$request
->
resultado
==
null
$request
->
inicioSubmissao
==
null
||
$request
->
fimSubmissao
==
null
||
$request
->
inicioRevisao
==
null
||
$request
->
fimRevisao
==
null
||
$request
->
resultado
==
null
){
$validatedData
=
$request
->
validate
([
$validatedData
=
$request
->
validate
([
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'numParticipantes'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
],
'fimSubmissao'
=>
[
'required'
,
'date'
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:fimSubmissao'
],
'fimRevisao'
=>
[
'required'
,
'date'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
],
'inicio_recurso'
=>
[
'required'
,
'date'
],
'fim_recurso'
=>
[
'required'
,
'date'
],
'resultado_final'
=>
[
'required'
,
'date'
],
'dt_inicioRelatorioParcial'
=>
[
'required'
,
'date'
],
'dt_fimRelatorioParcial'
=>
[
'required'
,
'date'
],
'dt_inicioRelatorioFinal'
=>
[
'required'
,
'date'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
],
'pdfEdital'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
'pdfFormAvalExterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalInterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
]);
}
$validated
=
$request
->
validate
([
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
,
'max:1500'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'numParticipantes'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
],
'fimSubmissao'
=>
[
'required'
,
'date'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:fimSubmissao'
],
'fimRevisao'
=>
[
'required'
,
'date'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
],
'inicio_recurso'
=>
[
'required'
,
'date'
],
'fim_recurso'
=>
[
'required'
,
'date'
],
'resultado_final'
=>
[
'required'
,
'date'
],
'dt_inicioRelatorioParcial'
=>
[
'required'
,
'date'
],
'dt_fimRelatorioParcial'
=>
[
'required'
,
'date'
],
'dt_inicioRelatorioFinal'
=>
[
'required'
,
'date'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
],
'pdfEdital'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'fimRevisao'
=>
[
'required'
,
'date'
,
'after:inicioRevisao'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
,
'after_or_equal:fimRevisao'
],
'inicio_recurso'
=>
[
'required'
,
'date'
,
'after_or_equal:resultado_preliminar'
],
'fim_recurso'
=>
[
'required'
,
'date'
,
'after:inicio_recurso'
],
'resultado_final'
=>
[
'required'
,
'date'
,
'after:fim_recurso'
],
'dt_inicioRelatorioParcial'
=>
[
'required'
,
'date'
,
'after:resultado_final'
],
'dt_fimRelatorioParcial'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioParcial'
],
'dt_inicioRelatorioFinal'
=>
[
'required'
,
'date'
,
'after:dt_fimRelatorioParcial'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioFinal'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
]);
}
$validated
=
$request
->
validate
([
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
,
'max:1500'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'numParticipantes'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:fimSubmissao'
],
'fimRevisao'
=>
[
'required'
,
'date'
,
'after:inicioRevisao'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
,
'after_or_equal:fimRevisao'
],
'inicio_recurso'
=>
[
'required'
,
'date'
,
'after_or_equal:resultado_preliminar'
],
'fim_recurso'
=>
[
'required'
,
'date'
,
'after:inicio_recurso'
],
'resultado_final'
=>
[
'required'
,
'date'
,
'after:fim_recurso'
],
'dt_inicioRelatorioParcial'
=>
[
'required'
,
'date'
,
'after:resultado_final'
],
'dt_fimRelatorioParcial'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioParcial'
],
'dt_inicioRelatorioFinal'
=>
[
'required'
,
'date'
,
'after:dt_fimRelatorioParcial'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioFinal'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
'pdfFormAvalExterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalInterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
]);
$evento
->
nome
=
$request
->
nome
;
...
...
@@ -422,19 +460,39 @@ class EventoController extends Controller
$evento
->
coordenadorId
=
$request
->
coordenador_id
;
$evento
->
consu
=
$request
->
has
(
'consu'
);
if
(
$request
->
pdfEdital
!=
null
){
$pdfEdital
=
$request
->
pdfEdital
;
$path
=
'pdfEdital/'
.
$evento
->
id
.
'/'
;
$nome
=
"edital.pdf"
;
Storage
::
putFileAs
(
$path
,
$pdfEdital
,
$nome
);
$pdfEdital
=
$request
->
pdfEdital
;
$path
=
'pdfEdital/'
.
$evento
->
id
.
'/'
;
$nome
=
"edital.pdf"
;
Storage
::
putFileAs
(
$path
,
$pdfEdital
,
$nome
);
}
if
(
$request
->
modeloDocumento
!=
null
){
$modeloDocumento
=
$request
->
modeloDocumento
;
$extension
=
$modeloDocumento
->
extension
();
$path
=
'modeloDocumento/'
.
$evento
->
id
.
'/'
;
$nome
=
"modelo"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$modeloDocumento
,
$nome
);
$evento
->
modeloDocumento
=
$path
.
$nome
;
$modeloDocumento
=
$request
->
modeloDocumento
;
$extension
=
$modeloDocumento
->
extension
();
$path
=
'modeloDocumento/'
.
$evento
->
id
.
'/'
;
$nome
=
"modelo"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$modeloDocumento
,
$nome
);
$evento
->
modeloDocumento
=
$path
.
$nome
;
}
if
(
isset
(
$request
->
pdfFormAvalInterno
)){
$pdfFormAvalInterno
=
$request
->
pdfFormAvalInterno
;
$extension
=
$pdfFormAvalInterno
->
extension
();
$path
=
'pdfFormAvalInterno/'
.
$evento
->
id
.
'/'
;
$nome
=
"formulario de avaliação interno"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$pdfFormAvalInterno
,
$nome
);
$evento
->
formAvaliacaoInterno
=
$path
.
$nome
;
}
if
(
isset
(
$request
->
pdfFormAvalExterno
)){
$pdfFormAvalExterno
=
$request
->
pdfFormAvalExterno
;
$extension
=
$pdfFormAvalExterno
->
extension
();
$path
=
'pdfFormAvalExterno/'
.
$evento
->
id
.
'/'
;
$nome
=
"formulario de avaliação externo"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$pdfFormAvalExterno
,
$nome
);
$evento
->
formAvaliacaoExterno
=
$path
.
$nome
;
}
$evento
->
update
();
...
...
@@ -464,17 +522,17 @@ class EventoController extends Controller
// $areas->delete();
// }
if
(
isset
(
$atividades
)){
$atividades
->
delete
();
$atividades
->
delete
();
}
if
(
isset
(
$comissao
)){
$comissao
->
delete
();
$comissao
->
delete
();
}
if
(
isset
(
$revisores
)){
$revisores
->
delete
();
$revisores
->
delete
();
}
if
(
isset
(
$trabalhos
)){
$trabalhos
->
delete
();
Trabalho
::
withTrashed
()
->
where
(
'evento_id'
,
$id
)
->
update
([
'evento_id'
=>
null
]);
$trabalhos
->
delete
();
Trabalho
::
withTrashed
()
->
where
(
'evento_id'
,
$id
)
->
update
([
'evento_id'
=>
null
]);
}
Storage
::
deleteDirectory
(
'pdfEdital/'
.
$evento
->
id
);
...
...
@@ -493,7 +551,7 @@ class EventoController extends Controller
// dd($ComissaoEventos);
$ids
=
[];
foreach
(
$ComissaoEvento
as
$ce
){
array_push
(
$ids
,
$ce
->
userId
);
array_push
(
$ids
,
$ce
->
userId
);
}
$users
=
User
::
find
(
$ids
);
...
...
@@ -515,128 +573,128 @@ class EventoController extends Controller
$revs
=
Revisor
::
where
(
'eventoId'
,
$evento
->
id
)
->
with
(
'user'
)
->
get
();
return
view
(
'coordenador.detalhesEvento'
,
[
'evento'
=>
$evento
,
'areas'
=>
$areas
,
'revisores'
=>
$revisores
,
'revs'
=>
$revs
,
'users'
=>
$users
,
'modalidades'
=>
$modalidades
,
'areaModalidades'
=>
$areaModalidades
,
'trabalhos'
=>
$trabalhos
,
'trabalhosEnviados'
=>
$trabalhosEnviados
,
'trabalhosAvaliados'
=>
$trabalhosAvaliados
,
'trabalhosPendentes'
=>
$trabalhosPendentes
,
'numeroRevisores'
=>
$numeroRevisores
,
'numeroComissao'
=>
$numeroComissao
]);
'evento'
=>
$evento
,
'areas'
=>
$areas
,
'revisores'
=>
$revisores
,
'revs'
=>
$revs
,
'users'
=>
$users
,
'modalidades'
=>
$modalidades
,
'areaModalidades'
=>
$areaModalidades
,
'trabalhos'
=>
$trabalhos
,
'trabalhosEnviados'
=>
$trabalhosEnviados
,
'trabalhosAvaliados'
=>
$trabalhosAvaliados
,
'trabalhosPendentes'
=>
$trabalhosPendentes
,
'numeroRevisores'
=>
$numeroRevisores
,
'numeroComissao'
=>
$numeroComissao
]);
}
public
function
numTrabalhos
(
Request
$request
){
$evento
=
Evento
::
find
(
$request
->
eventoId
);
$this
->
authorize
(
'isCoordenador'
,
$evento
);
$validatedData
=
$request
->
validate
([
'eventoId'
=>
[
'required'
,
'integer'
],
'trabalhosPorAutor'
=>
[
'required'
,
'integer'
],
'numCoautor'
=>
[
'required'
,
'integer'
]
]);
$evento
->
numMaxTrabalhos
=
$request
->
trabalhosPorAutor
;
$evento
->
numMaxCoautores
=
$request
->
numCoautor
;
$evento
->
save
();
return
redirect
()
->
route
(
'coord.detalhesEvento'
,
[
'eventoId'
=>
$request
->
eventoId
]);
$evento
=
Evento
::
find
(
$request
->
eventoId
);
$this
->
authorize
(
'isCoordenador'
,
$evento
);
$validatedData
=
$request
->
validate
([
'eventoId'
=>
[
'required'
,
'integer'
],
'trabalhosPorAutor'
=>
[
'required'
,
'integer'
],
'numCoautor'
=>
[
'required'
,
'integer'
]
]);
$evento
->
numMaxTrabalhos
=
$request
->
trabalhosPorAutor
;
$evento
->
numMaxCoautores
=
$request
->
numCoautor
;
$evento
->
save
();
return
redirect
()
->
route
(
'coord.detalhesEvento'
,
[
'eventoId'
=>
$request
->
eventoId
]);
}
public
function
setResumo
(
Request
$request
){
$evento
=
Evento
::
find
(
$request
->
eventoId
);
$this
->
authorize
(
'isCoordenador'
,
$evento
);
$validatedData
=
$request
->
validate
([
'eventoId'
=>
[
'required'
,
'integer'
],
'hasResumo'
=>
[
'required'
,
'string'
]
]);
if
(
$request
->
hasResumo
==
'true'
){
$evento
->
hasResumo
=
true
;
}
else
{
$evento
->
hasResumo
=
false
;
}
$evento
->
save
();
return
redirect
()
->
route
(
'coord.detalhesEvento'
,
[
'eventoId'
=>
$request
->
eventoId
]);
$evento
=
Evento
::
find
(
$request
->
eventoId
);
$this
->
authorize
(
'isCoordenador'
,
$evento
);
$validatedData
=
$request
->
validate
([
'eventoId'
=>
[
'required'
,
'integer'
],
'hasResumo'
=>
[
'required'
,
'string'
]
]);
if
(
$request
->
hasResumo
==
'true'
){
$evento
->
hasResumo
=
true
;
}
else
{
$evento
->
hasResumo
=
false
;
}
$evento
->
save
();
return
redirect
()
->
route
(
'coord.detalhesEvento'
,
[
'eventoId'
=>
$request
->
eventoId
]);
}
public
function
setFotoEvento
(
Request
$request
){
$evento
=
Evento
::
find
(
$request
->
eventoId
);
$this
->
authorize
(
'isCoordenador'
,
$evento
);
// dd($request);
$validatedData
=
$request
->
validate
([
'eventoId'
=>
[
'required'
,
'integer'
],
'fotoEvento'
=>
[
'required'
,
'file'
,
'mimes:png'
]
]);
$file
=
$request
->
fotoEvento
;
$path
=
'public/eventos/'
.
$evento
->
id
;
$nome
=
'/logo.png'
;
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$evento
->
fotoEvento
=
$path
.
$nome
;
$evento
->
save
();
return
redirect
()
->
route
(
'coord.detalhesEvento'
,
[
'eventoId'
=>
$request
->
eventoId
]);
$evento
=
Evento
::
find
(
$request
->
eventoId
);
$this
->
authorize
(
'isCoordenador'
,
$evento
);
// dd($request);
$validatedData
=
$request
->
validate
([
'eventoId'
=>
[
'required'
,
'integer'
],
'fotoEvento'
=>
[
'required'
,
'file'
,
'mimes:png'
]
]);
$file
=
$request
->
fotoEvento
;
$path
=
'public/eventos/'
.
$evento
->
id
;
$nome
=
'/logo.png'
;
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$evento
->
fotoEvento
=
$path
.
$nome
;
$evento
->
save
();
return
redirect
()
->
route
(
'coord.detalhesEvento'
,
[
'eventoId'
=>
$request
->
eventoId
]);
}
public
function
areaParticipante
()
{
$eventos
=
Evento
::
all
();
$eventos
=
Evento
::
all
();
return
view
(
'user.areaParticipante'
,[
'eventos'
=>
$eventos
]);
return
view
(
'user.areaParticipante'
,[
'eventos'
=>
$eventos
]);
}
public
function
listComissao
()
{
$comissaoEvento
=
ComissaoEvento
::
where
(
'userId'
,
Auth
::
user
()
->
id
)
->
get
();
$eventos
=
Evento
::
all
();
$evnts
=
[];
$comissaoEvento
=
ComissaoEvento
::
where
(
'userId'
,
Auth
::
user
()
->
id
)
->
get
();
$eventos
=
Evento
::
all
();
$evnts
=
[];
foreach
(
$comissaoEvento
as
$comissao
)
{
foreach
(
$eventos
as
$evento
)
{
if
(
$comissao
->
eventosId
==
$evento
->
id
){
array_push
(
$evnts
,
$evento
);
}
foreach
(
$comissaoEvento
as
$comissao
)
{
foreach
(
$eventos
as
$evento
)
{
if
(
$comissao
->
eventosId
==
$evento
->
id
){
array_push
(
$evnts
,
$evento
);
}
}
}
}
return
view
(
'user.comissoes'
,[
'eventos'
=>
$evnts
]);
return
view
(
'user.comissoes'
,[
'eventos'
=>
$evnts
]);
}
public
function
listComissaoTrabalhos
(
Request
$request
)
{
$evento
=
Evento
::
find
(
$request
->
eventoId
);
$areasId
=
Area
::
where
(
'eventoId'
,
$evento
->
id
)
->
select
(
'id'
)
->
get
();
$trabalhos
=
Trabalho
::
whereIn
(
'areaId'
,
$areasId
)
->
orderBy
(
'id'
)
->
get
();
$evento
=
Evento
::
find
(
$request
->
eventoId
);
$areasId
=
Area
::
where
(
'eventoId'
,
$evento
->
id
)
->
select
(
'id'
)
->
get
();
$trabalhos
=
Trabalho
::
whereIn
(
'areaId'
,
$areasId
)
->
orderBy
(
'id'
)
->
get
();
return
view
(
'user.areaComissao'
,
[
'trabalhos'
=>
$trabalhos
]);
return
view
(
'user.areaComissao'
,
[
'trabalhos'
=>
$trabalhos
]);
}
public
function
baixarEdital
(
$id
)
{
$evento
=
Evento
::
find
(
$id
);
$evento
=
Evento
::
find
(
$id
);
if
(
Storage
::
disk
()
->
exists
(
$evento
->
pdfEdital
))
{
ob_end_clean
();
return
Storage
::
download
(
$evento
->
pdfEdital
);
}
if
(
Storage
::
disk
()
->
exists
(
$evento
->
pdfEdital
))
{
ob_end_clean
();
return
Storage
::
download
(
$evento
->
pdfEdital
);
}
return
abort
(
404
);
return
abort
(
404
);
}
public
function
baixarModelos
(
$id
)
{
$evento
=
Evento
::
find
(
$id
);
$evento
=
Evento
::
find
(
$id
);
if
(
Storage
::
disk
()
->
exists
(
$evento
->
modeloDocumento
))
{
ob_end_clean
();
return
Storage
::
download
(
$evento
->
modeloDocumento
);
}
if
(
Storage
::
disk
()
->
exists
(
$evento
->
modeloDocumento
))
{
ob_end_clean
();
return
Storage
::
download
(
$evento
->
modeloDocumento
);
}
return
abort
(
404
);
return
abort
(
404
);
}
}
app/Http/Controllers/ParticipanteController.php
View file @
46fcda2f
...
...
@@ -117,4 +117,16 @@ class ParticipanteController extends Controller
$participante
->
save
();
return
redirect
()
->
back
()
->
with
([
'mensagem'
=>
'Alteração da bolsa realizada com sucesso!'
]);
}
public
function
atualizarDocComplementar
(
Request
$request
){
$participante
=
Participante
::
find
(
$request
->
partcipanteId
);
$pasta
=
'participantes/'
.
$participante
->
id
;
$participante
->
anexoTermoCompromisso
=
Storage
::
putFileAs
(
$pasta
,
$request
->
termoCompromisso
,
"Termo_de_Compromisso.pdf"
);
$participante
->
anexoComprovanteMatricula
=
Storage
::
putFileAs
(
$pasta
,
$request
->
comprovanteMatricula
,
"Comprovante_de_Matricula.pdf"
);
$participante
->
anexoLattes
=
Storage
::
putFileAs
(
$pasta
,
$request
->
pdfLattes
,
"Curriculo_Lattes.pdf"
);
$participante
->
linkLattes
=
$request
->
linkLattes
;
$participante
->
update
();
return
redirect
()
->
back
()
->
with
([
'sucesso'
=>
"Documentação complementar enviada com sucesso"
]);
}
}
app/Participante.php
View file @
46fcda2f
...
...
@@ -34,7 +34,4 @@ class Participante extends Model
return
$this
->
hasOne
(
'App\Arquivo'
,
'participanteId'
);
}
public
function
documentacaoComplementar
()
{
return
$this
->
hasOne
(
'App\DocumentacaoComplementar'
,
'participante_id'
);
}
}
database/migrations/2022_0
2_22_094237_create_documentacao_complementars_table
.php
→
database/migrations/2022_0
3_17_085158_alter_table_eventos3
.php
View file @
46fcda2f
...
...
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateDocumentacaoComplementarsTable
extends
Migration
class
AlterTableEventos3
extends
Migration
{
/**
* Run the migrations.
...
...
@@ -13,17 +13,9 @@ class CreateDocumentacaoComplementarsTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'documentacao_complementars'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'termoCompromisso'
);
$table
->
string
(
'comprovanteMatricula'
);
$table
->
string
(
'pdfLattes'
);
$table
->
string
(
'linkLattes'
);
$table
->
integer
(
'participante_id'
)
->
nullable
();
$table
->
foreign
(
'participante_id'
)
->
references
(
'id'
)
->
on
(
'participantes'
);
$table
->
timestamps
();
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'formAvaliacaoExterno'
)
->
nullable
();
$table
->
string
(
'formAvaliacaoInterno'
)
->
nullable
();
});
}
...
...
@@ -34,6 +26,9 @@ class CreateDocumentacaoComplementarsTable extends Migration
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'documentacao_complementars'
);
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'formAvaliacaoExterno'
);
$table
->
dropColumn
(
'formAvaliacaoInterno'
);
});
}
}
resources/views/administrador/analisar.blade.php
View file @
46fcda2f
...
...
@@ -78,7 +78,7 @@
@
if
(
$trabalho
->
status
==
"aprovado"
)
<
img
src
=
"
{
{asset('img/icons/aprovado.png')}
}
"
style
=
"width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;"
alt
=
""
>
@
elseif
(
$trabalho
->
status
==
"reprovado"
)
<
img
src
=
"
{
{asset('img/icons/negado.png')}
}
"
style
=
"width: 23%;margin: auto;display: flex;margin-top:
5
px;justify-content: center;align-items: center;"
alt
=
""
>
<
img
src
=
"
{
{asset('img/icons/negado.png')}
}
"
style
=
"width: 23%;margin: auto;display: flex;margin-top:
0
px;justify-content: center;align-items: center;"
alt
=
""
>
@
elseif
(
$trabalho
->
status
==
"corrigido"
)
<
img
src
=
"
{
{asset('img/icons/parcialmenteAprovado.png')}
}
"
style
=
"width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;"
alt
=
""
>
@
else
...
...
resources/views/administrador/analisarProposta.blade.php
View file @
46fcda2f
...
...
@@ -389,12 +389,12 @@
<
div
class
=
"form-row mt-3"
>
<
div
class
=
"col-md-11"
><
h5
style
=
"color: #234B8B; font-weight: bold"
>
Avaliadores
</
h5
></
div
>
<
div
class
=
"col-md-1 text-sm-right"
>
<
a
type
=
"button"
value
=
"{{
$trabalho->id
}}"
id
=
"atribuir1"
data
-
toggle
=
"modal"
data
-
target
=
"#avaliadorModalCenter
{{
$trabalho->id
}}
"
>
<
a
type
=
"button"
value
=
"{{
$trabalho->id
}}"
id
=
"atribuir1"
data
-
toggle
=
"modal"
data
-
target
=
"#avaliadorModalCenter"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/add.ico')}
}
"
style
=
"width:30px"
alt
=
""
>
</
a
>
</
div
>
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"avaliadorModalCenter
{{
$trabalho->id
}}
"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"
avaliadorModalCenterTitle
"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal fade"
id
=
"avaliadorModalCenter
"
data
-
bs
-
backdrop
=
"static"
data
-
bs
-
keyboard
=
"false
"
tabindex
=
"-1"
aria
-
labelledby
=
"
staticBackdropLabel
"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
role
=
"document"
>
<
div
class
=
"modal-content modal-submeta"
>
<
div
class
=
"modal-header modal-header-submeta"
>
...
...
@@ -404,6 +404,13 @@
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
@
if
(
session
(
'error'
))
<
div
class
=
"col-md-12"
>
<
div
class
=
"alert alert-danger"
role
=
"alert"
>
<
p
>
{{
session
(
'error'
)
}}
</
p
>
</
div
>
</
div
>
@
endif
<
form
action
=
"{{ route('admin.atribuicao.projeto') }}"
method
=
"POST"
>
@
csrf
...
...
@@ -435,9 +442,24 @@
</div>
</div>
<select name="
avaliadores_id
[]
" multiple class="
form
-
control
" id="
exampleFormControlSelect2
" required>
<div class="
col
-
md
-
6
">
<label style="
font
-
weight
:
bold
">Externos</label>
</div>
<select name="
avaliadores_externos_id
[]
" multiple class="
form
-
control
" id="
exampleFormControlSelect3
">
@foreach (
$trabalho->aval
as
$avaliador
)
@if(
$avaliador->tipo
== "
Externo
")
<option value="
{{
$avaliador
->
id
}}
" > {{
$avaliador->user
->name }} > {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}} > {{$avaliador->area->nome ?? 'Indefinida'}} >
{
{$avaliador->user->email}
}
</option>
@endif
@endforeach
</select>
<div class="
col
-
md
-
6
">
<label style="
font
-
weight
:
bold
">Internos</label>
</div>
<select name="
avaliadores_internos_id
[]
" multiple class="
form
-
control
" id="
exampleFormControlSelect2
">
@foreach (
$trabalho->aval
as
$avaliador
)
<option value="
{{
$avaliador
->
id
}}
" > {{
$avaliador->user
->name }} > {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}} > {{$avaliador->area->nome ?? 'Indefinida'}} >
{
{$avaliador->user->email}
}
</option>
@if(
$avaliador->tipo
== "
Interno
")
<option value="
{{
$avaliador
->
id
}}
" > {{
$avaliador->user
->name }} > {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}} > {{$avaliador->area->nome ?? 'Indefinida'}} >
{
{$avaliador->user->email}
}
</option>
@endif
@endforeach
</select>
<small id="
emailHelp
" class="
form
-
text
text
-
muted
">Segure SHIFT do teclado para selecionar mais de um.</small>
...
...
@@ -480,6 +502,10 @@
<
a
href
=
"{{ route('admin.removerProjAval', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
]) }}"
>
Remover
</
a
>--
}}
<
br
>
<
a
href
=
"{{ route('admin.reenviar.atribuicao.projeto', ['evento_id' =>
$evento->id
, 'avaliador_id'=>
$avaliador->id
, 'trabalho_id' =>
$trabalho->id
]) }}"
>
Reenviar
convite
</
a
>
</
div
>
@
endif
@
endforeach
...
...
@@ -505,6 +531,9 @@
{{
--
<
a
href
=
"{{ route('admin.removerProjAval', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
]) }}"
>
Remover
</
a
>--
}}
<
a
href
=
"{{ route('admin.reenviar.atribuicao.projeto', ['evento_id' =>
$evento->id
, 'avaliador_id'=>
$avaliador->id
, 'trabalho_id' =>
$trabalho->id
]) }}"
>
Reenviar
convite
</
a
>
</
div
>
@
endif
@
endforeach
...
...
@@ -895,5 +924,13 @@
})
}
</
script
>
<
script
>
if
({
!!
json_encode
(
session
(
'error'
),
JSON_HEX_TAG
)
!!
})
{
$
(
document
)
.
ready
(
function
(){
$
(
'#avaliadorModalCenter'
)
.
modal
(
'show'
);
});
}
</
script
>
@
endsection
resources/views/administrador/selecionarAvaliadores.blade.php
View file @
46fcda2f
...
...
@@ -152,16 +152,16 @@
<
input
type
=
"hidden"
name
=
"evento_id"
value
=
"{{
$evento->id
}}"
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputEmail1"
>
Nome
Completo
<
span
style
=
"color: red;"
>*</
span
></
label
>
<
input
type
=
"text"
class
=
"form-control"
name
=
"nomeAvaliador"
id
=
"exampleInputNome1"
>
<
input
type
=
"text"
class
=
"form-control"
name
=
"nomeAvaliador"
id
=
"exampleInputNome1"
required
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputEmail1"
>
Email
<
span
style
=
"color: red;"
>*</
span
></
label
>
<
input
type
=
"email"
class
=
"form-control"
name
=
"emailAvaliador"
id
=
"exampleInputEmail1"
>
<
input
type
=
"email"
class
=
"form-control"
name
=
"emailAvaliador"
id
=
"exampleInputEmail1"
required
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"grandeArea"
class
=
"col-form-label"
>
{{
__
(
'Grande Área'
)
}}
<
span
style
=
"color: red; font-weight:bold"
>*</
span
></
label
>
<
select
class
=
"form-control"
id
=
"grandeArea"
name
=
"grande_area_id"
onchange
=
"areas()"
>
<
select
class
=
"form-control"
id
=
"grandeArea"
name
=
"grande_area_id"
onchange
=
"areas()"
required
>
<
option
value
=
""
disabled
selected
hidden
>--
Grande
Área
--</
option
>
@
foreach
(
$grandeAreas
as
$grandeArea
)
<
option
value
=
"
{
{$grandeArea->id}}">{{$grandeArea->nome}
}
</option>
...
...
@@ -169,7 +169,7 @@
</select>
<label for="
area
" class="
col
-
form
-
label
">{{ __('Área') }} <span style="
color
:
red
;
font
-
weight
:
bold
">*</span></label>
<select class="
form
-
control
@
error
(
'area'
)
is
-
invalid
@
enderror
" id="
area
" name="
area_id
" >
<select class="
form
-
control
@
error
(
'area'
)
is
-
invalid
@
enderror
" id="
area
" name="
area_id
"
required
>
<option value="" disabled selected hidden>-- Área --</option>
</select>
</div>
...
...
@@ -180,6 +180,25 @@
</select>
</div>
<div class="
form
-
group
">
<label for="
exampleFormControlSelect1
">Instituição <span style="
color
:
red
;
font
-
weight
:
bold
">*</span></label>
<select class="
form
-
control
" name="
instituicao
" id="
membro
" required onchange="
mostrarDiv
(
this
)
">
<option value="" disabled>-- Selecione a instituição --</option>
<option value="
ufape
" >Universidade Federal do Agreste de Pernambuco</option>
<option value="
outra
" >Outra</option>
</select>
</div>
<div class="
form
-
group
" id="
div
-
outra
" style="
@
if
(
old
(
'instituicao'
)
!=
null
&&
old
(
'instituicao'
)
==
"outra"
)
display
:
block
;
@
else
display
:
none
;
@
endif
">
<label for="
outra
">{{ __('Digite o nome da instituição') }}<span style="
color
:
red
;
font
-
weight
:
bold
;
"> *</span></label>
<input id="
outra
" class="
form
-
control
@
error
(
'outra'
)
is
-
invalid
@
enderror
" type="
text
" name="
outra
" value="
{{
old
(
'outra'
)}}
" autocomplete="
outra
" placeholder="
Universidade
Federal
...
">
@error('outra')
<div id="
validationServer03Feedback
" class="
invalid
-
feedback
">
{{
$message
}}
</div>
@enderror
</div>
<div class="
form
-
group
" style="
margin
-
top
:
40
px
;
margin
-
bottom
:
40
px
;
">
<button type="
submit
" class="
btn
btn
-
info
" style="
width
:
100
%
">Enviar</button>
</div>
...
...
@@ -254,5 +273,15 @@
})
}
function mostrarDiv(select) {
if(select.value == "
outra
") {
document.getElementById('div-outra').style.display = "
block
";
$("
#outra").prop('required',true);
}
else
if
(
select
.
value
==
"ufape"
){
document
.
getElementById
(
'div-outra'
)
.
style
.
display
=
"none"
;
$
(
"#outra"
)
.
prop
(
'required'
,
false
);
}
}
</
script
>
@
endsection
resources/views/documentacaoComplementar/listar.blade.php
View file @
46fcda2f
...
...
@@ -34,7 +34,9 @@
<td style="
text
-
align
:
center
;
" title="
{{
$participante
->
user
->
name
}}
">
{
{$participante->user->name}
}
</td>
<td style="
text
-
align
:
center
;
">
<button type="
button
" class="
btn
btn
-
primary
" data-toggle="
modal
" data-target="
#modalConfirm{{$participante->id}}" @if($trabalho->status!="aprovado")disabled="disabled" @endif>
@
if
(
$participante
->
documentacaoComplementar
==
null
)
@
if
(
$participante
->
anexoComprovanteMatricula
==
null
||
$participante
->
anexoTermoCompromisso
==
null
||
$participante
->
anexoLattes
==
null
||
$participante
->
linkLattes
==
null
)
Pendente
@
else
Visualizar
...
...
@@ -43,7 +45,7 @@
</
td
>
</
tbody
>
<
div
class
=
"modal fade"
id
=
"modalConfirm
{
{$participante->id}
}
"
tabindex
=
"-1"
role
=
"dial
o
g"
<
div
class
=
"modal fade"
id
=
"modalConfirm
{
{$participante->id}
}
"
tabindex
=
"-1"
role
=
"
o
dialg"
aria
-
labelledby
=
"modalConfirmLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-lg"
role
=
"document"
>
<
div
class
=
"modal-content"
>
...
...
@@ -57,7 +59,11 @@
<
input
type
=
"hidden"
value
=
"
{
{$participante->id}
}
"
name
=
"partcipanteId"
>
<
div
class
=
"row col-md-12"
>
<
div
class
=
"col-md-6"
>
<
label
class
=
"control-label "
>
Termo
de
Compromisso
</
label
>
<
label
class
=
"control-label "
>
Termo
de
Compromisso
@
if
(
$participante
->
anexoTermoCompromisso
)
:
<
a
id
=
"modeloDocumentoTemp"
href
=
"{{ route('baixar.documentosParticipante', ['pathDocumento' =>
$participante->anexoTermoCompromisso
]) }}"
>
Arquivo
atual
</
a
>
@
endif
</
label
>
<
br
>
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"termoCompromisso"
accept
=
".pdf"
id
=
"termoCompromisso
{
{$participante->id}
}
"
required
/>
...
...
@@ -69,7 +75,11 @@
<
br
>
</
div
>
<
div
class
=
"col-md-6"
>
<
label
class
=
"control-label "
>
Comprovante
de
Matricula
</
label
>
<
label
class
=
"control-label "
>
Comprovante
de
Matricula
@
if
(
$participante
->
anexoComprovanteMatricula
)
:
<
a
id
=
"modeloDocumentoTemp"
href
=
"{{ route('baixar.documentosParticipante', ['pathDocumento' =>
$participante->anexoComprovanteMatricula
]) }}"
>
Arquivo
atual
</
a
>
@
endif
</
label
>
<
br
>
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"comprovanteMatricula"
accept
=
".pdf"
id
=
"comprovanteMatricula
{
{$participante->id}
}
"
required
/>
@
error
(
'comprovanteMatricula'
)
...
...
@@ -81,7 +91,10 @@
</
div
>
<
div
class
=
"col-md-6"
>
<
label
class
=
"control-label "
>
PDF
Lattes
</
label
>
<
label
class
=
"control-label "
>
PDF
Lattes
@
if
(
$participante
->
anexoLattes
)
:
<
a
id
=
"modeloDocumentoTemp"
href
=
"{{ route('baixar.documentosParticipante', ['pathDocumento' =>
$participante->anexoLattes
]) }}"
>
Arquivo
atual
</
a
>
@
endif
</
label
>
<
br
>
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"pdfLattes"
accept
=
".pdf"
id
=
"pdfLattes
{
{$participante->id}
}
"
required
/>
...
...
@@ -92,10 +105,10 @@
@
enderror
</
div
>
<
div
class
=
"col-md-6"
>
<
label
class
=
"control-label "
>
Link
Lattes
</
label
>
<
label
class
=
"control-label "
>
Link
Lattes
</
label
>
<
br
>
<
input
type
=
"text"
class
=
"input-group-text col-md-12"
name
=
"linkLattes"
placeholder
=
"Link Lattes"
id
=
"linkLattes
{
{$participante->id}
}
"
required
/>
required
@
if
(
$participante
->
linkLattes
)
value
=
"
{
{$participante->linkLattes}
}
"
@
endif
/>
@
error
(
'linkLattes'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
style
=
"overflow: visible; display:block"
>
<
strong
>
{{
$message
}}
</
strong
>
...
...
resources/views/evento/criarEvento.blade.php
View file @
46fcda2f
...
...
@@ -25,13 +25,13 @@
</
span
>
@
enderror
</
div
>
<
div
class
=
"col-sm-5"
>
<
label
for
=
"tipo"
class
=
"col-form-label"
>
{{
__
(
'Tipo*:'
)
}}
</
label
>
<
select
id
=
"tipo"
type
=
"text"
class
=
"form-control @error('tipo') is-invalid @enderror"
name
=
"tipo"
value
=
"{{ old('tipo') }}"
required
>
<
option
@
if
(
old
(
'tipo'
)
==
'PIBIC'
)
selected
@
endif
value
=
"PIBIC"
>
PIBIC
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
'PIBIC-EM'
)
selected
@
endif
value
=
"PIBIC-EM"
>
PIBIC
-
EM
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
'PIBITI'
)
selected
@
endif
value
=
"PIBITI"
>
PIBITI
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
'PIBITI'
)
selected
@
endif
value
=
"PIBITI"
>
PIBITI
</
option
>
</
select
>
@
error
(
'tipo'
)
...
...
@@ -45,8 +45,8 @@
<
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
)
<
option
@
if
(
old
(
'natureza'
)
==
$natureza
->
id
)
selected
@
endif
value
=
"{{
$natureza->id
}}"
>
{{
$natureza
->
nome
}}
</
option
>
@
endforeach
<
option
@
if
(
old
(
'natureza'
)
==
$natureza
->
id
)
selected
@
endif
value
=
"{{
$natureza->id
}}"
>
{{
$natureza
->
nome
}}
</
option
>
@
endforeach
</
select
>
@
error
(
'natureza'
)
...
...
@@ -57,7 +57,7 @@
</
div
>
<
div
class
=
"col-sm-2"
>
<
label
for
=
"numParticipantes"
class
=
"col-form-label"
>
{{
__
(
'Nº de Participantes*:'
)
}}
</
label
>
<
input
id
=
"numParticipantes"
type
=
"number"
min
=
"1"
max
=
"20"
class
=
"form-control @error('numParticipantes') is-invalid @enderror"
name
=
"numParticipantes"
value
=
"{{ old('numParticipantes') }}"
required
autocomplete
=
"numParticipantes"
autofocus
>
@
error
(
'numParticipantes'
)
...
...
@@ -127,10 +127,10 @@
<span class="
invalid
-
feedback
" role="
alert
">
<strong>
@if (
$message
!= null)
@for (
$i
= 0;
$i
< 9;
$i
++)
@for (
$i
= 0;
$i
< 9;
$i
++)
@if (
$i
< 8)
{{ explode("
",
$message
)[
$i
] }}
@else
@else
{{ date('d/m/Y', strtotime(explode("
",
$message
)[
$i
])) }}
@endif
@endfor
...
...
@@ -195,7 +195,7 @@
</span>
@enderror
</div>
</div>
<div class="
row
justify
-
content
-
left
">
<div class="
col
-
sm
-
6
">
...
...
@@ -208,7 +208,7 @@
</span>
@enderror
</div>
<div class="
col
-
sm
-
6
">
<label for="
resultado_final
" class="
col
-
form
-
label
">{{ __('Resultado Final*:') }}</label>
<input id="
resultado_final
" type="
date
" class="
form
-
control
@
error
(
'resultado_final'
)
is
-
invalid
@
enderror
" name="
resultado_final
" value="
{{
old
(
'resultado_final'
)
}}
" required autocomplete="
resultado
" autofocus>
...
...
@@ -288,11 +288,11 @@
<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>
<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="
hidden
" id="
pdfEditalPreenchido
" name="
pdfEditalPreenchido
" value="
{{
old
(
'pdfEditalPreenchido'
)
}}
" >
<input type="
file
" accept="
.
pdf
" class="
form
-
control
-
file
pdf
@
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')
...
...
@@ -302,7 +302,7 @@
@enderror
</div>
</div>
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
modeloDocumento
">Anexar arquivo com os modelos de documentos do edital:</label>
...
...
@@ -319,7 +319,40 @@
@enderror
</div>
</div>
</div>
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
pdfFormAvalExterno
">Formulário de avaliação externo:</label>
@if(old('pdfFormAvalExternoPreenchido') != null)
<a id="
pdfFormAvalExternoTemp
" href="
{{
route
(
'baixar.evento.temp'
,
[
'nomeAnexo'
=>
'formAvaliacaoExterno'
])}}
">Arquivo atual</a>
@endif
<input type="
hidden
" id="
pdfFormAvalExternoPreenchido
" name="
pdfFormAvalExternoPreenchido
" value="
{{
old
(
'pdfFormAvalExternoPreenchido'
)
}}
" >
<input type="
file
" accept="
.
pdf
" class="
form
-
control
-
file
pdf
@
error
(
'pdfFormAvalExterno'
)
is
-
invalid
@
enderror
" name="
pdfFormAvalExterno
" value="
{{
old
(
'pdfFormAvalExterno'
)
}}
" id="
pdfFormAvalExterno
" onchange="
exibirAnexoTemp
(
this
)
">
<small>O arquivo selecionado deve ser no formato PDF de até 2mb.</small>
@error('pdfFormAvalExterno')
<span class="
invalid
-
feedback
" role="
alert
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
</div>
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
pdfFormAvalExterno
">Formulário de avaliação interno:</label>
@if(old('pdfFormAvalInternoPreenchido') != null)
<a id="
pdfFormAvalExternoTemp
" href="
{{
route
(
'baixar.evento.temp'
,
[
'nomeAnexo'
=>
'formAvaliacaoInterno'
])}}
">Arquivo atual</a>
@endif
<input type="
hidden
" id="
pdfFormAvalInternoPreenchido
" name="
pdfFormAvalInternoPreenchido
" value="
{{
old
(
'pdfFormAvalInternoPreenchido'
)
}}
" >
<input type="
file
" accept="
.
pdf
" class="
form
-
control
-
file
pdf
@
error
(
'pdfFormAvalInterno'
)
is
-
invalid
@
enderror
" name="
pdfFormAvalInterno
" value="
{{
old
(
'pdfFormAvalInterno'
)
}}
" id="
pdfFormAvalInterno
" onchange="
exibirAnexoTemp
(
this
)
">
<small>O arquivo selecionado deve ser no formato PDF de até 2mb.</small>
@error('pdfFormAvalInterno')
<span class="
invalid
-
feedback
" role="
alert
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
</div>
</div>
<div class="
row
justify
-
content
-
center
" style="
margin
:
20
px
0
20
px
0
">
...
...
@@ -349,6 +382,14 @@
var modeloDocumentoPreenchido = document.getElementById('modeloDocumentoPreenchido');
modeloDocumentoPreenchido.value = "
sim
";
}
if(file.id === "
pdfFormAvalExterno
"){
var pdfFormAvalExternoPreenchido = document.getElementById('pdfFormAvalExternoPreenchido');
pdfFormAvalExternoPreenchido.value = "
sim
";
}
if(file.id === "
pdfFormAvalInterno
"){
var pdfFormAvalInternoPreenchido = document.getElementById('pdfFormAvalInternoPreenchido');
pdfFormAvalInternoPreenchido.value = "
sim
";
}
}
$("
input
[
type
=
'file'
]
").on("
change
", function () {
...
...
resources/views/evento/editarEvento.blade.php
View file @
46fcda2f
...
...
@@ -311,6 +311,38 @@
@
enderror
</
div
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfEdital"
>
Formulário
de
avaliação
externo
:</
label
>
<
a
href
=
"{{route('download', ['file' =>
$evento->formAvaliacaoExterno
])}}"
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('pdfFormAvalExterno') is-invalid @enderror"
name
=
"pdfFormAvalExterno"
value
=
"{{ old('pdfFormAvalExterno') }}"
id
=
"pdfFormAvalExterno"
>
<
small
>
O
arquivo
selecionado
deve
ser
no
formato
PDF
de
até
2
mb
.
</
small
>
@
error
(
'pdfFormAvalExterno'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfEdital"
>
Formulário
de
avaliação
interno
:</
label
>
<
a
href
=
"{{route('download', ['file' =>
$evento->formAvaliacaoInterno
])}}"
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('pdfFormAvalInterno') is-invalid @enderror"
name
=
"pdfFormAvalInterno"
value
=
"{{ old('pdfFormAvalInterno') }}"
id
=
"pdfFormAvalInterno"
>
<
small
>
O
arquivo
selecionado
deve
ser
no
formato
PDF
de
até
2
mb
.
</
small
>
@
error
(
'pdfFormAvalInterno'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
</
div
>
</
div
>
...
...
routes/web.php
View file @
46fcda2f
...
...
@@ -155,7 +155,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
//########## Documentação Complementar
Route
::
get
(
'/documentacaoComplementar'
,
'ParticipanteController@listarParticipanteProjeto'
)
->
name
(
'docComplementar.listar'
);
Route
::
post
(
'/documentacaoComplementar/enviar'
,
'
DocumentacaoComplementarController@cri
ar'
)
->
name
(
'docComplementar.enviar'
);
Route
::
post
(
'/documentacaoComplementar/enviar'
,
'
ParticipanteController@atualizarDocComplement
ar'
)
->
name
(
'docComplementar.enviar'
);
//######### Atribuição #######################################
Route
::
get
(
'/atribuir'
,
'AtribuicaoController@distribuicaoAutomatica'
)
->
name
(
'distribuicao'
);
...
...
@@ -203,6 +203,7 @@ Route::prefix('usuarios')->name('admin.')->group(function(){
Route
::
post
(
'/removerAvalEvento'
,
'AdministradorController@remover'
)
->
name
(
'remover'
);
Route
::
get
(
'/removerProjAval'
,
'AdministradorController@removerProjAval'
)
->
name
(
'removerProjAval'
);
Route
::
post
(
'/atribuirAvaliadorProjeto'
,
'AdministradorController@atribuicaoProjeto'
)
->
name
(
'atribuicao.projeto'
);
Route
::
get
(
'/reenviarConviteAtribuicaoProjeto'
,
'AdministradorController@reenviarConviteAtribuicaoProjeto'
)
->
name
(
'reenviar.atribuicao.projeto'
);
Route
::
post
(
'/enviarConviteAvaliador'
,
'AdministradorController@enviarConvite'
)
->
name
(
'enviarConvite'
);
Route
::
post
(
'/reenviarConviteAvaliador'
,
'AdministradorController@reenviarConvite'
)
->
name
(
'reenviarConvite'
);
Route
::
post
(
'/visualizarParecer'
,
'AdministradorController@visualizarParecer'
)
->
name
(
'visualizarParecer'
);
...
...
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