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
561a6f19
Unverified
Commit
561a6f19
authored
Jun 05, 2020
by
Gabriel Antônio da Silva
Committed by
GitHub
Jun 05, 2020
Browse files
Merge pull request #13 from lmts-ufape/carlos
Carlos
parents
7387b6c8
9f414dff
Changes
62
Show whitespace changes
Inline
Side-by-side
app/Area.php
View file @
561a6f19
...
...
@@ -34,4 +34,7 @@ class Area extends Model
public
function
revisor
(){
return
$this
->
hasMany
(
'App\User'
,
'eventoId'
);
}
public
function
avaliador
(){
return
$this
->
hasMany
(
'App\Area'
);
}
}
app/Avaliador.php
View file @
561a6f19
...
...
@@ -6,10 +6,23 @@ use Illuminate\Database\Eloquent\Model;
class
Avaliador
extends
Model
{
protected
$fillable
=
[
'status'
,
'parecer'
,
'AnexoParecer'
,
'pivot'
,
];
public
function
user
(){
return
$this
->
belongsTo
(
'App\User'
);
}
public
function
trabalhos
(){
return
$this
->
belongsToMany
(
'App\Trabalho'
);
return
$this
->
belongsToMany
(
'App\Trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao'
)
;
}
public
function
eventos
(){
return
$this
->
belongsToMany
(
'App\Evento'
);
}
public
function
area
(){
return
$this
->
belongsTo
(
'App\Area'
);
}
}
app/Evento.php
View file @
561a6f19
...
...
@@ -40,6 +40,9 @@ class Evento extends Model
public
function
trabalhos
(){
return
$this
->
hasMany
(
'App\Trabalho'
);
}
public
function
avaliadors
(){
return
$this
->
belongsToMany
(
'App\Avaliador'
);
}
}
app/Http/Controllers/AdministradorController.php
View file @
561a6f19
...
...
@@ -10,8 +10,14 @@ use App\Avaliador;
use
App\AdministradorResponsavel
;
use
App\Participante
;
use
App\Proponente
;
use
App\Natureza
;
use
App\Trabalho
;
use
Illuminate\Support\Str
;
use
Illuminate\Support\Facades\Hash
;
use
App\Evento
;
use
App\Mail\EmailParaUsuarioNaoCadastrado
;
use
Illuminate\Support\Facades\Mail
;
use
App\Mail\EventoCriado
;
class
AdministradorController
extends
Controller
{
...
...
@@ -20,8 +26,8 @@ class AdministradorController extends Controller
return
view
(
'administrador.index'
);
}
public
function
naturezas
(){
return
view
(
'naturezas.index'
);
$naturezas
=
Natureza
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'naturezas.index'
)
->
with
([
'naturezas'
=>
$naturezas
])
;
}
public
function
usuarios
(){
$users
=
User
::
orderBy
(
'name'
)
->
get
();
...
...
@@ -31,11 +37,29 @@ class AdministradorController extends Controller
public
function
editais
(){
//$admin = Administrador::with('user')->where('user_id', Auth()->user()->id)->first();
//$eventos = Evento::where('coordenadorId',$admin->id )->get();
$eventos
=
Evento
::
where
(
'criador_id'
,
Auth
()
->
user
()
->
id
)
->
get
();
$eventos
=
Evento
::
all
();
return
view
(
'administrador.editais'
,
[
'eventos'
=>
$eventos
]);
}
public
function
pareceres
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$trabalhos
=
$evento
->
trabalhos
;
return
view
(
'administrador.projetos'
)
->
with
([
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
}
public
function
visualizarParecer
(
Request
$request
){
$avaliador
=
Avaliador
::
find
(
$request
->
avaliador_id
);
$trabalho
=
$avaliador
->
trabalhos
->
where
(
'id'
,
$request
->
trabalho_id
)
->
first
();
$parecer
=
$avaliador
->
trabalhos
->
where
(
'id'
,
$request
->
trabalho_id
)
->
first
()
->
pivot
;
//dd($parecer);
return
view
(
'administrador.visualizarParecer'
)
->
with
([
'trabalho'
=>
$trabalho
,
'parecer'
=>
$parecer
,
'avaliador'
=>
$avaliador
]);
}
public
function
create
()
{
$grandesAreas
=
GrandeArea
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'administrador.novo_user'
)
->
with
([
'grandeAreas'
=>
$grandesAreas
]);
...
...
@@ -62,6 +86,7 @@ class AdministradorController extends Controller
'cargo'
=>
'required'
,
'titulacaoMaxima'
=>
'required'
,
'anoTitulacao'
=>
'required'
,
'areaFormacao'
=>
'required'
,
'area'
=>
'required'
,
'bolsistaProdutividade'
=>
'required'
,
'nivel'
=>
'required'
,
...
...
@@ -100,6 +125,7 @@ class AdministradorController extends Controller
$proponente
->
vinculo
=
$request
->
vinculo
;
$proponente
->
titulacaoMaxima
=
$request
->
titulacaoMaxima
;
$proponente
->
anoTitulacao
=
$request
->
anoTitulacao
;
$proponente
->
areaFormacao
=
$request
->
areaFormacao
;
$proponente
->
grandeArea
=
$request
->
area
;
$proponente
->
area
=
"teste"
;
$proponente
->
subArea
=
"teste"
;
...
...
@@ -156,6 +182,7 @@ class AdministradorController extends Controller
'cargo'
=>
'required'
,
'titulacaoMaxima'
=>
'required'
,
'anoTitulacao'
=>
'required'
,
'areaFormacao'
=>
'required'
,
'grandeArea'
=>
'required'
,
'bolsistaProdutividade'
=>
'required'
,
'nivel'
=>
'required'
,
...
...
@@ -189,6 +216,7 @@ class AdministradorController extends Controller
$proponente
->
vinculo
=
$request
->
vinculo
;
$proponente
->
titulacaoMaxima
=
$request
->
titulacaoMaxima
;
$proponente
->
anoTitulacao
=
$request
->
anoTitulacao
;
$proponente
->
areaFormacao
=
$request
->
areaFormacao
;
$proponente
->
grandeArea
=
$request
->
grandeArea
;
$proponente
->
area
=
"teste"
;
$proponente
->
subArea
=
"teste"
;
...
...
@@ -238,4 +266,130 @@ class AdministradorController extends Controller
$user
->
delete
();
return
redirect
(
route
(
'admin.usuarios'
)
)
->
with
([
'mensagem'
=>
'Usuário deletado com sucesso'
]);
}
public
function
atribuir
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
//dd($request->all());
return
view
(
'administrador.atribuirAvaliadores'
,
[
'evento'
=>
$evento
]);
}
public
function
selecionar
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$avalSelecionados
=
$evento
->
avaliadors
;
$avalNaoSelecionadosId
=
$evento
->
avaliadors
->
pluck
(
'id'
);
$avaliadores
=
Avaliador
::
whereNotIn
(
'id'
,
$avalNaoSelecionadosId
)
->
get
();
//dd($avaliadores);
return
view
(
'administrador.selecionarAvaliadores'
,
[
'evento'
=>
$evento
,
'avaliadores'
=>
$avaliadores
,
'avalSelecionados'
=>
$avalSelecionados
]);
}
public
function
projetos
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$trabalhos
=
$evento
->
trabalhos
;
$avaliadores
=
$evento
->
avaliadors
;
foreach
(
$trabalhos
as
$key
=>
$trabalho
)
{
$avalSelecionadosId
=
$trabalho
->
avaliadors
->
pluck
(
'id'
);
$avalProjeto
=
Avaliador
::
whereNotIn
(
'id'
,
$avalSelecionadosId
)
->
get
();
$trabalho
->
aval
=
$avalProjeto
;
}
//dd($avaliadores->teste);
return
view
(
'administrador.selecionarProjetos'
,
[
'evento'
=>
$evento
,
'trabalhos'
=>
$trabalhos
,
'avaliadores'
=>
$avaliadores
]);
}
public
function
adicionar
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$aval
=
Avaliador
::
where
(
'id'
,
$request
->
avaliador_id
)
->
first
();
$aval
->
eventos
()
->
attach
(
$evento
);
$aval
->
save
();
return
redirect
()
->
back
();
}
public
function
remover
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$aval
=
Avaliador
::
where
(
'id'
,
$request
->
avaliador_id
)
->
first
();
$aval
->
eventos
()
->
detach
(
$evento
);
$aval
->
trabalhos
()
->
detach
();
$aval
->
save
();
return
redirect
()
->
back
();
}
public
function
buscar
(
Request
$request
){
$trabalho
=
Trabalho
::
where
(
'id'
,
$request
->
item
)
->
first
();
$avalSelecionadosId
=
$trabalho
->
avaliadors
->
pluck
(
'id'
);
$avalProjeto
=
Avaliador
::
whereNotIn
(
'id'
,
$avalSelecionadosId
)
->
get
();
//dd($avaliadores);
return
response
()
->
json
(
$avalProjeto
);
}
public
function
atribuicao
(
Request
$request
){
$trabalho
=
Trabalho
::
where
(
'id'
,
$request
->
trabalho_id
)
->
first
();
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$avaliadores
=
Avaliador
::
whereIn
(
'id'
,
$request
->
avaliadores_id
)
->
get
();
$trabalho
->
avaliadors
()
->
attach
(
$avaliadores
);
$evento
->
avaliadors
()
->
syncWithoutDetaching
(
$avaliadores
);
$trabalho
->
save
();
return
redirect
()
->
back
();
}
public
function
enviarConvite
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$nomeAvaliador
=
$request
->
nomeAvaliador
;
$emailAvaliador
=
$request
->
emailAvaliador
;
$tipo
=
$request
->
tipo
;
$passwordTemporario
=
Str
::
random
(
8
);
Mail
::
to
(
$emailAvaliador
)
->
send
(
new
EmailParaUsuarioNaoCadastrado
(
$nomeAvaliador
,
' '
,
'Avaliador'
,
$evento
->
nome
,
$passwordTemporario
));
$user
=
User
::
create
([
'email'
=>
$emailAvaliador
,
'password'
=>
bcrypt
(
$passwordTemporario
),
'usuarioTemp'
=>
true
,
'name'
=>
$nomeAvaliador
,
'tipo'
=>
'avaliador'
,
]);
$avaliador
=
new
Avaliador
();
$avaliador
->
save
();
$avaliador
->
user
()
->
associate
(
$user
);
$avaliador
->
eventos
()
->
attach
(
$evento
);
$user
->
save
();
$avaliador
->
save
();
return
redirect
()
->
back
();
}
}
app/Http/Controllers/ArquivoController.php
View file @
561a6f19
...
...
@@ -3,6 +3,7 @@
namespace
App\Http\Controllers
;
use
App\Arquivo
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Http\Request
;
class
ArquivoController
extends
Controller
...
...
@@ -82,4 +83,9 @@ class ArquivoController extends Controller
{
//
}
public
function
baixarPlano
(
$id
)
{
$arquivo
=
Arquivo
::
find
(
$id
);
return
Storage
::
download
(
$arquivo
->
nome
);
}
}
app/Http/Controllers/Auth/RegisterController.php
View file @
561a6f19
...
...
@@ -62,13 +62,6 @@ class RegisterController extends Controller
'cpf'
=>
[
'required'
,
'cpf'
],
'celular'
=>
[
'required'
,
'string'
],
'instituicao'
=>
[
'required'
,
'string'
,
'max:255'
],
// 'especProfissional' => [],
'rua'
=>
[
'required'
,
'string'
,
'max:255'
],
'numero'
=>
[
'nullable'
,
'string'
],
'bairro'
=>
[
'required'
,
'string'
,
'max:255'
],
'cidade'
=>
[
'required'
,
'string'
,
'max:255'
],
'uf'
=>
[
'required'
,
'string'
],
'cep'
=>
[
'required'
,
'string'
],
]);
}
...
...
@@ -81,18 +74,6 @@ class RegisterController extends Controller
protected
function
create
(
array
$data
)
{
// endereço
$end
=
new
Endereco
();
$end
->
rua
=
$data
[
'rua'
];
$end
->
numero
=
$data
[
'numero'
];
$end
->
bairro
=
$data
[
'bairro'
];
$end
->
cidade
=
$data
[
'cidade'
];
$end
->
uf
=
$data
[
'uf'
];
$end
->
cep
=
$data
[
'cep'
];
$end
->
save
();
// dd($end)
$user
=
new
User
();
$user
->
name
=
$data
[
'name'
];
$user
->
email
=
$data
[
'email'
];
...
...
@@ -102,7 +83,6 @@ class RegisterController extends Controller
$user
->
instituicao
=
$data
[
'instituicao'
];
$user
->
tipo
=
'participante'
;
$user
->
enderecoId
=
$end
->
id
;
$user
->
save
();
$participante
=
new
Participante
();
...
...
app/Http/Controllers/AvaliadorController.php
View file @
561a6f19
...
...
@@ -4,6 +4,11 @@ namespace App\Http\Controllers;
use
Illuminate\Http\Request
;
use
Auth
;
use
App\Trabalho
;
use
App\Evento
;
use
App\Recomendacao
;
use
App\User
;
use
App\Avaliador
;
class
AvaliadorController
extends
Controller
{
...
...
@@ -12,13 +17,60 @@ class AvaliadorController extends Controller
return
view
(
'avaliador.index'
);
}
public
function
editais
(){
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$eventos
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
()
->
eventos
;
return
view
(
'avaliador.editais'
,
[
"eventos"
=>
$eventos
]);
}
public
function
visualizarTrabalhos
(
Request
$request
){
$trabalhos
=
Auth
::
user
()
->
avaliadors
->
first
()
->
trabalhos
;
//dd($trabalhos);
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$trabalhos
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
()
->
trabalhos
;
//dd();
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
}
public
function
parecer
(
Request
$request
){
//$trabalho = Trabalho::find($request->trabalho_id);
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$avaliador
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$evento
=
Evento
::
find
(
$request
->
evento
);
$recomendacaos
=
Recomendacao
::
all
();
//dd($request->all());
return
view
(
'avaliador.parecer'
,
[
'trabalho'
=>
$trabalho
,
'evento'
=>
$evento
,
'recomendacaos'
=>
$recomendacaos
]);
}
public
function
enviarParecer
(
Request
$request
){
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$evento
=
Evento
::
find
(
$request
->
evento_id
);
$trabalhos
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
()
->
trabalhos
;
$avaliador
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
if
(
$request
->
anexoParecer
==
''
){
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'recomendacao'
=>
$request
->
recomendacao
]);
}
else
{
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'AnexoParecer'
=>
$request
->
anexoParecer
,
'recomendacao'
=>
$request
->
recomendacao
]);
}
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalho
s
]
);
// dd(
$trabalho);
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
}
}
app/Http/Controllers/EventoController.php
View file @
561a6f19
...
...
@@ -14,6 +14,7 @@ use App\User;
use
App\Proponente
;
use
App\Trabalho
;
use
App\AreaModalidade
;
use
App\Natureza
;
use
App\CoordenadorComissao
;
use
Illuminate\Http\Request
;
use
Carbon\Carbon
;
...
...
@@ -57,7 +58,8 @@ class EventoController extends Controller
public
function
create
()
{
$coordenadors
=
CoordenadorComissao
::
with
(
'user'
)
->
get
();
return
view
(
'evento.criarEvento'
,
[
'coordenadors'
=>
$coordenadors
]);
$naturezas
=
Natureza
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'evento.criarEvento'
,
[
'coordenadors'
=>
$coordenadors
,
'naturezas'
=>
$naturezas
]);
}
/**
...
...
@@ -90,6 +92,7 @@ class EventoController extends Controller
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
],
'tipo'
=>
[
'required'
,
'string'
],
'natureza'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
],
'fimSubmissao'
=>
[
'required'
,
'date'
],
'inicioRevisao'
=>
[
'required'
,
'date'
],
...
...
@@ -106,6 +109,7 @@ class EventoController extends Controller
'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
],
...
...
@@ -119,6 +123,7 @@ class EventoController extends Controller
'nome'
=>
$request
->
nome
,
'descricao'
=>
$request
->
descricao
,
'tipo'
=>
$request
->
tipo
,
'natureza_id'
=>
$request
->
natureza
,
'inicioSubmissao'
=>
$request
->
inicioSubmissao
,
'fimSubmissao'
=>
$request
->
fimSubmissao
,
'inicioRevisao'
=>
$request
->
inicioRevisao
,
...
...
@@ -192,16 +197,7 @@ class EventoController extends Controller
$trabalhosCount
=
0
;
}
$trabalhosId
=
Trabalho
::
where
(
'evento_id'
,
$evento
->
id
)
->
select
(
'id'
)
->
get
();
//$trabalhosIdCoautor = Proponente::whereIn('trabalhoId', $trabalhosId)->where('proponente_id', Auth::user()->id)->select('trabalhoId')->get();
//$coautorCount = Coautor::whereIn('trabalhoId', $trabalhosId)->where('proponente_id', Auth::user()->id)->count();
//$trabalhosCoautor = Trabalho::whereIn('id', $trabalhosIdCoautor)->get();
// if($coautorCount != 0){
// $hasTrabalhoCoautor = true;
// $hasFile = true;
// }
$mytime
=
Carbon
::
now
(
'America/Recife'
);
// dd(false);
...
...
@@ -304,15 +300,15 @@ class EventoController extends Controller
{
$evento
=
Evento
::
find
(
$id
);
$areas
=
Area
::
where
(
'eventoId'
,
$id
);
//
$areas = Area::where('eventoId', $id);
$atividades
=
Atividade
::
where
(
'eventoId'
,
$id
);
$comissao
=
ComissaoEvento
::
where
(
'eventosId'
,
$id
);
$revisores
=
Revisor
::
where
(
'eventoId'
,
$id
);
$trabalhos
=
Trabalho
::
where
(
'evento
I
d'
,
$id
);
$trabalhos
=
Trabalho
::
where
(
'evento
_i
d'
,
$id
);
if
(
isset
(
$areas
)){
$areas
->
delete
();
}
//
if(isset($areas)){
//
$areas->delete();
//
}
if
(
isset
(
$atividades
)){
$atividades
->
delete
();
}
...
...
@@ -467,5 +463,8 @@ class EventoController extends Controller
return
view
(
'user.areaComissao'
,
[
'trabalhos'
=>
$trabalhos
]);
}
public
function
baixarEdital
(
$id
)
{
$evento
=
Evento
::
find
(
$id
);
return
Storage
::
download
(
$evento
->
pdfEdital
);
}
}
app/Http/Controllers/NaturezaController.php
0 → 100644
View file @
561a6f19
<?php
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
App\Natureza
;
class
NaturezaController
extends
Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public
function
index
()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public
function
create
()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public
function
store
(
Request
$request
)
{
$validated
=
$request
->
validate
([
'nome'
=>
'required'
]);
$natureza
=
new
Natureza
();
$natureza
->
nome
=
$request
->
nome
;
$natureza
->
save
();
return
redirect
(
route
(
'admin.naturezas'
)
)
->
with
([
'mensagem'
=>
'Natureza salva com sucesso'
]);
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
show
(
$id
)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
edit
(
$id
)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
update
(
Request
$request
,
$id
)
{
$validated
=
$request
->
validate
([
'nomeEditavel'
=>
'required'
,
]);
$natureza
=
Natureza
::
find
(
$id
);
$natureza
->
nome
=
$request
->
nomeEditavel
;
$natureza
->
update
();
return
redirect
(
route
(
'admin.naturezas'
)
)
->
with
([
'mensagem'
=>
"Natureza editada com sucesso"
]);
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
destroy
(
$id
)
{
$natureza
=
Natureza
::
find
(
$id
);
$natureza
->
delete
();
return
redirect
(
route
(
'admin.naturezas'
)
)
->
with
([
'mensagem'
=>
"Natureza deletada com sucesso"
]);
}
}
app/Http/Controllers/ProponenteController.php
View file @
561a6f19
...
...
@@ -3,6 +3,11 @@
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
Auth
;
use
App\User
;
use
App\Proponente
;
use
App\GrandeArea
;
use
App\Evento
;
class
ProponenteController
extends
Controller
{
...
...
@@ -10,4 +15,51 @@ class ProponenteController extends Controller
return
view
(
'proponente.index'
);
}
public
function
create
(){
$grandesAreas
=
GrandeArea
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'proponente.cadastro'
)
->
with
([
'grandeAreas'
=>
$grandesAreas
]);;
}
public
function
store
(
Request
$request
){
if
(
Auth
::
user
()
->
proponentes
==
null
)
{
$validated
=
$request
->
validate
([
'senha'
=>
'required'
,
'cargo'
=>
'required'
,
'titulacaoMaxima'
=>
'required'
,
'anoTitulacao'
=>
'required'
,
'areaFormacao'
=>
'required'
,
'area'
=>
'required'
,
'bolsistaProdutividade'
=>
'required'
,
'nivel'
=>
'required'
,
'linkLattes'
=>
'required'
,
]);
$proponente
=
new
Proponente
();
$proponente
->
SIAPE
=
$request
->
SIAPE
;
$proponente
->
cargo
=
$request
->
cargo
;
$proponente
->
vinculo
=
$request
->
vinculo
;
$proponente
->
titulacaoMaxima
=
$request
->
titulacaoMaxima
;
$proponente
->
anoTitulacao
=
$request
->
anoTitulacao
;
$proponente
->
areaFormacao
=
$request
->
areaFormacao
;
$proponente
->
grandeArea
=
$request
->
area
;
$proponente
->
area
=
"teste"
;
$proponente
->
subArea
=
"teste"
;
$proponente
->
bolsistaProdutividade
=
$request
->
bolsistaProdutividade
;
$proponente
->
nivel
=
$request
->
nivel
;
$proponente
->
linkLattes
=
$request
->
linkLattes
;
$proponente
->
user_id
=
Auth
::
user
()
->
id
;
$proponente
->
save
();
$user
=
User
::
find
(
Auth
()
->
user
()
->
id
);
$user
->
tipo
=
"proponente"
;
$user
->
save
();
}
$eventos
=
Evento
::
all
();
return
redirect
(
route
(
'admin.editais'
,
[
'eventos'
=>
$eventos
]))
->
with
([
'mensagem'
=>
'Usuário cadastrado com sucesso'
]);
}
}
app/Http/Controllers/TrabalhoController.php
View file @
561a6f19
...
...
@@ -76,8 +76,11 @@ class TrabalhoController extends Controller
$mytime
=
$mytime
->
toDateString
();
$evento
=
Evento
::
find
(
$request
->
editalId
);
$coordenador
=
CoordenadorComissao
::
find
(
$evento
->
coordenadorId
);
//Relaciona o projeto criado com o proponente que criou o projeto
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
//$trabalho->proponentes()->save($proponente);
//dd($coordenador->id);
$trabalho
=
"trabalho"
;
if
(
$evento
->
inicioSubmissao
>
$mytime
){
if
(
$mytime
>=
$evento
->
fimSubmissao
){
return
redirect
()
->
route
(
'home'
);
...
...
@@ -88,59 +91,64 @@ class TrabalhoController extends Controller
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
){
$validatedData
=
$request
->
validate
([
'editalId'
=>
[
'required'
,
'
integer
'
],
'editalId'
=>
[
'required'
,
'
string
'
],
'nomeProjeto'
=>
[
'required'
,
'string'
],
'grandeArea
Id'
=>
[
'required'
,
'
integer
'
],
'area
Id'
=>
[
'required'
,
'
integer
'
],
'subArea
Id'
=>
[
'required'
,
'
integer
'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'
integer
'
],
'grandeArea
'
=>
[
'required'
,
'
string
'
],
'area
'
=>
[
'required'
,
'
string
'
],
'subArea
'
=>
[
'required'
,
'
string
'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'
string
'
],
'linkGrupo'
=>
[
'required'
,
'string'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'string'
],
'nomePlanoTrabalho.*'
=>
[
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
'funcaoParticipante.*'
=>
[
'required'
,
'string'
],
'nomePlanoTrabalho.*'
=>
[
'required'
,
'string'
],
'anexoProjeto'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
//'anexoCONSU' => ['required', 'file', 'mimes:pdf', 'max:2000000'],
'anexoLatterCoordenador'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
]);
//dd($request->all());
$trabalho
=
Trabalho
::
create
([
'titulo'
=>
$request
->
nomeProjeto
,
'coordenador_id'
=>
$coordenador
->
id
,
'grande_area_id'
=>
$request
->
grandeArea
Id
,
'area_id'
=>
$request
->
area
Id
,
'sub_area_id'
=>
$request
->
subArea
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
,
'proponente_id'
=>
$proponente
->
id
,
//Anexos
'anexoDecisaoCONSU'
=>
$request
->
anexoCONSU
,
'anexoProjeto'
=>
$request
->
anexoProjeto
,
'anexoAutorizacaoComiteEtica'
=>
$request
->
anexoComiteEtica
,
'justificativaAutorizacaoEtica'
=>
$request
->
justificativaAutorizacaoEtica
,
'anexoLattesCoordenador'
=>
$request
->
anexoLatterCoordenador
,
'anexoPlanilhaPontuacao'
=>
$request
->
anexoPlanilha
,
]);
//dd($
request->all()
);
//dd($
trabalho
);
}
else
{
//Caso em que o anexo da Decisão do CONSU não necessário
$validatedData
=
$request
->
validate
([
'editalId'
=>
[
'required'
,
'
integer
'
],
'editalId'
=>
[
'required'
,
'
string
'
],
'nomeProjeto'
=>
[
'required'
,
'string'
,],
'grandeArea
Id'
=>
[
'required'
,
'
integer
'
],
'area
Id'
=>
[
'required'
,
'
integer
'
],
'subArea
Id'
=>
[
'required'
,
'
integer
'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'
integer
'
],
'grandeArea
'
=>
[
'required'
,
'
string
'
],
'area
'
=>
[
'required'
,
'
string
'
],
'subArea
'
=>
[
'required'
,
'
string
'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'
string
'
],
'linkGrupo'
=>
[
'required'
,
'string'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
],
'nomeCoordenador'
=>
[
'required'
,
'string'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'string'
],
'nomePlanoTrabalho.*'
=>
[
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
'funcaoParticipante.*'
=>
[
'required'
,
'string'
],
'nomePlanoTrabalho.*'
=>
[
'required'
,
'string'
],
'anexoProjeto'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLatterCoordenador'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
...
...
@@ -150,9 +158,9 @@ class TrabalhoController extends Controller
$trabalho
=
Trabalho
::
create
([
'titulo'
=>
$request
->
nomeProjeto
,
'coordenador_id'
=>
$coordenador
->
id
,
'grande_area_id'
=>
$request
->
grandeArea
Id
,
'area_id'
=>
$request
->
area
Id
,
'sub_area_id'
=>
$request
->
subArea
Id
,
'grande_area_id'
=>
$request
->
grandeArea
,
'area_id'
=>
$request
->
area
,
'sub_area_id'
=>
$request
->
subArea
,
'coordenador'
=>
$request
->
nomeCoordenador
,
'pontuacaoPlanilha'
=>
$request
->
pontuacaoPlanilha
,
'linkGrupoPesquisa'
=>
$request
->
linkGrupo
,
...
...
@@ -160,26 +168,24 @@ class TrabalhoController extends Controller
'data'
=>
$mytime
,
'evento_id'
=>
$request
->
editalId
,
'avaliado'
=>
0
,
'proponente_id'
=>
$proponente
->
id
,
//Anexos
'anexoProjeto'
=>
$request
->
anexoProjeto
,
'anexoAutorizacaoComiteEtica'
=>
$request
->
anexoComiteEtica
,
'justificativaAutorizacaoEtica'
=>
$request
->
justificativaAutorizacaoEtica
,
'anexoLattesCoordenador'
=>
$request
->
anexoLatterCoordenador
,
'anexoPlanilhaPontuacao'
=>
$request
->
anexoPlanilha
,
]);
}
//Relaciona o projeto criado com o proponente que criou o projeto
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
$trabalho
->
proponentes
()
->
save
(
$proponente
);
//Envia email com senha temp para cada participante do projeto
if
(
$request
->
emailParticipante
!=
null
){
foreach
(
$request
->
emailParticipante
as
$key
=>
$value
)
{
$userParticipante
=
User
::
where
(
'email'
,
$value
)
->
first
();
$participante
=
new
Participante
();
if
(
$userParticipante
==
null
){
$passwordTemporario
=
Str
::
random
(
8
);
...
...
@@ -190,66 +196,47 @@ class TrabalhoController extends Controller
'usuarioTemp'
=>
true
,
'name'
=>
$request
->
nomeParticipante
[
$key
],
'tipo'
=>
'participante'
,
'funcao_participante_id'
=>
$request
->
funcaoParticipante
[
$key
],
]);
$participante
=
$usuario
->
participantes
()
->
create
([
'trabalho_id'
=>
$trabalho
->
id
,
]);
$participante
->
user_id
=
$usuario
->
id
;
$participante
->
trabalho_id
=
$trabalho
->
id
;
$participante
->
funcao_participante_id
=
$request
->
funcaoParticipante
[
$key
];
$participante
->
save
();
$participante
->
trabalhos
()
->
save
(
$trabalho
);
}
else
{
$subject
=
"Participante de Projeto"
;
$email
=
$value
;
Mail
::
to
(
$email
)
->
send
(
new
SubmissaoTrabalho
(
$userParticipante
,
$subject
));
}
}
}
$anexos
=
array
(
$request
->
anexoCONSU
,
$request
->
anexoProjeto
,
$request
->
anexoComiteEtica
,
$request
->
anexoLatterCoordenador
,
$request
->
anexoPlanilha
,
);
foreach
(
$anexos
as
$key
=>
$value
)
{
$file
=
$value
;
$path
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
"1.pdf"
;
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
Arquivo
::
create
([
'nome'
=>
$path
.
$nome
,
'trabalhoId'
=>
$trabalho
->
id
,
'data'
=>
$mytime
,
'versaoFinal'
=>
true
,
]);
}
if
(
$request
->
anexoPlanoTrabalho
!=
null
){
foreach
(
$request
->
anexoPlanoTrabalho
as
$key
=>
$value
)
{
$file
=
$value
;
$usuario
=
User
::
where
(
'email'
,
$value
)
->
first
();
$participante
=
Participante
::
where
([[
'user_id'
,
'='
,
$usuario
->
id
],
[
'trabalho_id'
,
'='
,
$trabalho
->
id
]])
->
first
();
$path
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
$request
->
nomePlanoTrabalho
[
$key
]
.
".pdf"
;
$file
=
$request
->
anexoPlanoTrabalho
[
$key
];
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
Arquivo
::
create
([
'
nome
'
=
>
$path
.
$nome
,
'
trabalhoId
'
=
>
$trabalho
->
id
,
'
data
'
=
>
$mytime
,
'versaoFinal'
=>
true
,
])
;
$arquivo
=
new
Arquivo
();
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
$arquivo
->
participanteId
=
$participante
->
id
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
}
}
$pasta
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
;
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
"CONSU.pdf"
);
$trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
"Projeto.pdf"
);
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
"Comite_de_etica.pdf"
);
$trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLatterCoordenador
,
"Latter_Coordenador.pdf"
);
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha.pdf"
);
$trabalho
->
update
();
//dd($trabalho);
$subject
=
"Submissão de Trabalho"
;
...
...
@@ -277,9 +264,25 @@ class TrabalhoController extends Controller
* @param \App\Trabalho $trabalho
* @return \Illuminate\Http\Response
*/
public
function
edit
(
Trabalho
$trabalho
)
public
function
edit
(
$id
)
{
//
$projeto
=
Trabalho
::
find
(
$id
);
$edital
=
Evento
::
find
(
$projeto
->
evento_id
);
$grandeAreas
=
GrandeArea
::
all
();
$areas
=
Area
::
all
();
$subareas
=
Subarea
::
all
();
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
$participantes
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
get
();
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$id
)
->
get
();
return
view
(
'projeto.editar'
)
->
with
([
'projeto'
=>
$projeto
,
'grandeAreas'
=>
$grandeAreas
,
'areas'
=>
$areas
,
'subAreas'
=>
$subareas
,
'edital'
=>
$edital
,
'funcaoParticipantes'
=>
$funcaoParticipantes
,
'participantes'
=>
$participantes
,
'arquivos'
=>
$arquivos
,]);
}
/**
...
...
@@ -289,9 +292,187 @@ class TrabalhoController extends Controller
* @param \App\Trabalho $trabalho
* @return \Illuminate\Http\Response
*/
public
function
update
(
Request
$request
,
Trabalho
$trabalho
)
public
function
update
(
Request
$request
,
$id
)
{
//
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
$evento
=
Evento
::
find
(
$request
->
editalId
);
$coordenador
=
CoordenadorComissao
::
find
(
$evento
->
coordenadorId
);
//Relaciona o projeto criado com o proponente que criou o projeto
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
//$trabalho->proponentes()->save($proponente);
//dd($coordenador->id);
$trabalho
=
"trabalho"
;
if
(
$evento
->
inicioSubmissao
>
$mytime
){
if
(
$mytime
>=
$evento
->
fimSubmissao
){
return
redirect
()
->
route
(
'home'
);
}
}
//O anexo de Decisão do CONSU dependo do tipo de edital
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
){
$validatedData
=
$request
->
validate
([
'editalId'
=>
[
'required'
,
'string'
],
'nomeProjeto'
=>
[
'required'
,
'string'
],
'grandeArea'
=>
[
'required'
,
'string'
],
'area'
=>
[
'required'
,
'string'
],
'subArea'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'linkGrupo'
=>
[
'required'
,
'string'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
'funcaoParticipante.*'
=>
[
'required'
,
'string'
],
]);
}
else
{
//Caso em que o anexo da Decisão do CONSU não necessário
$validatedData
=
$request
->
validate
([
'editalId'
=>
[
'required'
,
'string'
],
'nomeProjeto'
=>
[
'required'
,
'string'
,],
'grandeArea'
=>
[
'required'
,
'string'
],
'area'
=>
[
'required'
,
'string'
],
'subArea'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'linkGrupo'
=>
[
'required'
,
'string'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
],
'nomeCoordenador'
=>
[
'required'
,
'string'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
'funcaoParticipante.*'
=>
[
'required'
,
'string'
],
]);
}
$trabalho
=
Trabalho
::
find
(
$id
);
$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
->
proponente_id
=
$proponente
->
id
;
$pasta
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
;
if
(
!
(
is_null
(
$request
->
anexoCONSU
)))
{
Storage
::
delete
(
$trabalho
->
anexoDecisaoCONSU
);
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
"CONSU.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoProjeto
)))
{
Storage
::
delete
(
$trabalho
->
anexoProjeto
);
$trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
"Projeto.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoComiteEtica
)))
{
Storage
::
delete
(
$trabalho
->
anexoComiteEtica
);
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
"Comite_de_etica.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoLatterCoordenador
)))
{
Storage
::
delete
(
$trabalho
->
anexoLattesCoordenador
);
$trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLatterCoordenador
,
"Latter_Coordenador.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoPlanilha
)))
{
Storage
::
delete
(
$trabalho
->
anexoLattesCoordenador
);
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha.pdf"
);
}
//atualizando projeto
$trabalho
->
update
();
// criando novos participantes que podem ter sido adicionados
$participantes
=
Participante
::
where
(
'trabalho_id'
,
$trabalho
->
id
)
->
get
();
$emailParticipantes
=
[];
foreach
(
$participantes
as
$participante
)
{
array_push
(
$emailParticipantes
,
$participante
->
user
->
email
);
}
foreach
(
$request
->
emailParticipante
as
$key
=>
$value
)
{
// criando novos participantes que podem ter sido adicionados
if
(
!
(
in_array
(
$request
->
emailParticipante
[
$key
],
$emailParticipantes
,
false
)))
{
$passwordTemporario
=
Str
::
random
(
8
);
Mail
::
to
(
$value
)
->
send
(
new
EmailParaUsuarioNaoCadastrado
(
Auth
()
->
user
()
->
name
,
' '
,
'Participante'
,
$evento
->
nome
,
$passwordTemporario
));
$usuario
=
User
::
create
([
'email'
=>
$value
,
'password'
=>
bcrypt
(
$passwordTemporario
),
'usuarioTemp'
=>
true
,
'name'
=>
$request
->
nomeParticipante
[
$key
],
'tipo'
=>
'participante'
,
]);
$participante
=
new
Participante
();
$participante
->
user_id
=
$usuario
->
id
;
$participante
->
trabalho_id
=
$trabalho
->
id
;
$participante
->
funcao_participante_id
=
$request
->
funcaoParticipante
[
$key
];
$participante
->
save
();
$path
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
$request
->
nomePlanoTrabalho
[
$key
]
.
".pdf"
;
$file
=
$request
->
anexoPlanoTrabalho
[
$key
];
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
$arquivo
->
participanteId
=
$participante
->
id
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
}
//atualizando os participantes que já estão no projeto e planos de trabalho se enviados
if
(
in_array
(
$request
->
emailParticipante
[
$key
],
$emailParticipantes
,
false
))
{
$user
=
User
::
where
(
'email'
,
$request
->
emailParticipante
[
$key
])
->
first
();
$participante
::
where
([[
'user_id'
,
'='
,
$user
->
id
],
[
'trabalho_id'
,
'='
,
$trabalho
->
id
]]);
$user
->
name
=
$request
->
nomeParticipante
[
$key
];
$user
->
update
();
$participante
->
funcao_participante_id
=
$request
->
funcaoParticipante
[
$key
];
$participante
->
update
();
// //atualizando planos de trabalho incompleto
// dd($request);
// if (!(is_null($request->anexoPlanoTrabalho[1]))) {
// $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->nome = $path . $nome;
// $arquivo->trabalhoId = $trabalho->id;
// $arquivo->data = $mytime;
// $arquivo->participanteId = $participante->id;
// $arquivo->versaoFinal = true;
// $arquivo->save();
// }
}
}
// Atualizando possiveis usuários removidos
$participantes
=
Participante
::
where
(
'trabalho_id'
,
$trabalho
->
id
)
->
get
();
foreach
(
$participantes
as
$participante
)
{
if
(
!
(
in_array
(
$participante
->
user
->
email
,
$request
->
emailParticipante
,
false
)))
{
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
);
Storage
::
delete
(
$arquivo
->
nome
);
$arquivo
->
delete
();
$participante
->
delete
();
}
}
return
redirect
()
->
route
(
'evento.visualizar'
,[
'id'
=>
$request
->
editalId
]);
}
/**
...
...
@@ -437,5 +618,35 @@ class TrabalhoController extends Controller
return
view
(
'coordenadorComissao.detalhesEdital'
,
[
'evento'
=>
$trabalho
->
evento
]);
}
public
function
projetosDoEdital
(
$id
)
{
$edital
=
Evento
::
find
(
$id
);
$projetos
=
Trabalho
::
where
(
'evento_id'
,
'='
,
$id
)
->
get
();
return
view
(
'projeto.index'
)
->
with
([
'edital'
=>
$edital
,
'projetos'
=>
$projetos
]);
}
public
function
baixarAnexoProjeto
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
anexoProjeto
);
}
public
function
baixarAnexoConsu
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
anexoDecisaoCONSU
);
}
public
function
baixarAnexoComite
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
anexoAutorizacaoComiteEtica
);
}
public
function
baixarAnexoLattes
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
anexoLattesCoordenador
);
}
public
function
baixarAnexoPlanilha
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
anexoPlanilhaPontuacao
);
}
}
app/Natureza.php
0 → 100644
View file @
561a6f19
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
Natureza
extends
Model
{
//
}
app/Participante.php
View file @
561a6f19
...
...
@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class
Participante
extends
Model
{
protected
$fillable
=
[
'name'
,
'user_id'
,
'trabalho_id'
];
protected
$fillable
=
[
'name'
,
'user_id'
,
'trabalho_id'
,
'participante_id'
];
public
function
user
(){
return
$this
->
belongsTo
(
'App\User'
);
...
...
app/Proponente.php
View file @
561a6f19
...
...
@@ -10,6 +10,6 @@ class Proponente extends Model
return
$this
->
belongsTo
(
'App\User'
);
}
public
function
trabalhos
(){
return
$this
->
belongsTo
Many
(
'App\Trabalho'
,
'trabalho_proponente'
);
return
$this
->
has
Many
(
'App\Trabalho'
);
}
}
app/Recomendacao.php
0 → 100644
View file @
561a6f19
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
Recomendacao
extends
Model
{
protected
$fillable
=
[
'nome'
];
}
app/Trabalho.php
View file @
561a6f19
...
...
@@ -14,7 +14,7 @@ class Trabalho extends Model
protected
$fillable
=
[
'titulo'
,
'data'
,
'a
vali
ado'
,
'a
prov
ado'
,
'decisaoCONSU'
,
'pontuacaoPlanilha'
,
'linkGrupoPesquisa'
,
...
...
@@ -22,6 +22,7 @@ class Trabalho extends Model
'anexoDecisaoCONSU'
,
'anexoAutorizacaoComiteEtica'
,
'JustificativaAutorizacaoEtica'
,
'anexoLattesCoordenador'
,
'anexoPlanilhaPontuacao'
,
'anexoProjeto'
,
...
...
@@ -32,6 +33,8 @@ class Trabalho extends Model
'evento_id'
,
'proponente_id'
,
'coordenador_id'
,
'proponente_id'
,
'pivot'
,
];
public
function
recurso
(){
...
...
@@ -47,7 +50,7 @@ class Trabalho extends Model
}
public
function
area
(){
return
$this
->
belongsTo
(
'App\Area'
,
'areaId'
);
return
$this
->
belongsTo
(
'App\Area'
);
}
public
function
autor
(){
...
...
@@ -75,13 +78,13 @@ class Trabalho extends Model
public
function
participantes
(){
return
$this
->
belongsToMany
(
'App\Participante'
,
'trabalho_participante'
);
}
public
function
proponente
s
(){
return
$this
->
belongsTo
Many
(
'App\Proponente'
,
'trabalho_proponente'
);
public
function
proponente
(){
return
$this
->
belongsTo
(
'App\Proponente'
);
}
public
function
coordenador
(){
return
$this
->
belongsTo
(
'App\CoordenadorComissao'
);
}
public
function
avaliadors
(){
return
$this
->
belongsToMany
(
'App\Avaliador'
);
return
$this
->
belongsToMany
(
'App\Avaliador'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao'
)
;
}
}
composer.lock
View file @
561a6f19
...
...
@@ -41,16 +41,16 @@
},
{
"name": "doctrine/inflector",
"version": "2.0.
2
",
"version": "2.0.
3
",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
"reference": "
3fc171224a316569faad2df6b18a1fd8cce5a56d
"
"reference": "
9cf661f4eb38f7c881cac67c75ea9b00bf97b210
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/
3fc171224a316569faad2df6b18a1fd8cce5a56d
",
"reference": "
3fc171224a316569faad2df6b18a1fd8cce5a56d
",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/
9cf661f4eb38f7c881cac67c75ea9b00bf97b210
",
"reference": "
9cf661f4eb38f7c881cac67c75ea9b00bf97b210
",
"shasum": ""
},
"require": {
...
...
@@ -114,7 +114,7 @@
"uppercase",
"words"
],
"time": "2020-05-2
5T20:08:47
+00:00"
"time": "2020-05-2
9T15:13:26
+00:00"
},
{
"name": "doctrine/lexer",
...
...
@@ -586,16 +586,16 @@
},
{
"name": "laravel/framework",
"version": "v6.18.1
6
",
"version": "v6.18.1
8
",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "
73f18a6bc58fb91aa83925161db25aa3674b73e9
"
"reference": "
9e5226ecc28f960cba1bd38b6d1d82a52e072dc3
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/
73f18a6bc58fb91aa83925161db25aa3674b73e9
",
"reference": "
73f18a6bc58fb91aa83925161db25aa3674b73e9
",
"url": "https://api.github.com/repos/laravel/framework/zipball/
9e5226ecc28f960cba1bd38b6d1d82a52e072dc3
",
"reference": "
9e5226ecc28f960cba1bd38b6d1d82a52e072dc3
",
"shasum": ""
},
"require": {
...
...
@@ -606,7 +606,7 @@
"ext-mbstring": "*",
"ext-openssl": "*",
"league/commonmark": "^1.3",
"league/flysystem": "^1.0.
8
",
"league/flysystem": "^1.0.
34
",
"monolog/monolog": "^1.12|^2.0",
"nesbot/carbon": "^2.0",
"opis/closure": "^3.1",
...
...
@@ -729,7 +729,7 @@
"framework",
"laravel"
],
"time": "2020-0
5-26T14:31:44
+00:00"
"time": "2020-0
6-02T22:32:07
+00:00"
},
{
"name": "laravel/tinker",
...
...
@@ -1090,16 +1090,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.3
4.2
",
"version": "2.3
5.0
",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "
3e87404329b8072295ea11d548b47a1eefe5a162
"
"reference": "
4b9bd835261ef23d36397a46a76b496a458305e5
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/
3e87404329b8072295ea11d548b47a1eefe5a162
",
"reference": "
3e87404329b8072295ea11d548b47a1eefe5a162
",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/
4b9bd835261ef23d36397a46a76b496a458305e5
",
"reference": "
4b9bd835261ef23d36397a46a76b496a458305e5
",
"shasum": ""
},
"require": {
...
...
@@ -1159,20 +1159,20 @@
"datetime",
"time"
],
"time": "2020-05-
19T22:14:16
+00:00"
"time": "2020-05-
24T18:27:52
+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.
4
.0",
"version": "v4.
5
.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "
bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120
"
"reference": "
53c2753d756f5adb586dca79c2ec0e2654dd9463
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/
bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120
",
"reference": "
bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120
",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/
53c2753d756f5adb586dca79c2ec0e2654dd9463
",
"reference": "
53c2753d756f5adb586dca79c2ec0e2654dd9463
",
"shasum": ""
},
"require": {
...
...
@@ -1211,7 +1211,7 @@
"parser",
"php"
],
"time": "2020-0
4-10T16:34:50
+00:00"
"time": "2020-0
6-03T07:24:19
+00:00"
},
{
"name": "opis/closure",
...
...
@@ -1831,22 +1831,23 @@
},
{
"name": "symfony/console",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "
10bb3ee3c97308869d53b3e3d03f6ac23ff985f7
"
"reference": "
326b064d804043005526f5a0494cfb49edb59bb0
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/
10bb3ee3c97308869d53b3e3d03f6ac23ff985f7
",
"reference": "
10bb3ee3c97308869d53b3e3d03f6ac23ff985f7
",
"url": "https://api.github.com/repos/symfony/console/zipball/
326b064d804043005526f5a0494cfb49edb59bb0
",
"reference": "
326b064d804043005526f5a0494cfb49edb59bb0
",
"shasum": ""
},
"require": {
"php": "
^
7.1.3",
"php": "
>=
7.1.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
"symfony/polyfill-php80": "^1.15",
"symfony/service-contracts": "^1.1|^2"
},
"conflict": {
...
...
@@ -1903,29 +1904,29 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2020-0
3
-30T
11:41:10
+00:00"
"time": "2020-0
5
-30T
20:06:45
+00:00"
},
{
"name": "symfony/css-selector",
"version": "v5.
0.8
",
"version": "v5.
1.0
",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "
5f8d5271303dad260692ba73dfa21777d38e124e
"
"reference": "
e544e24472d4c97b2d11ade7caacd446727c6bf9
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/
5f8d5271303dad260692ba73dfa21777d38e124e
",
"reference": "
5f8d5271303dad260692ba73dfa21777d38e124e
",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/
e544e24472d4c97b2d11ade7caacd446727c6bf9
",
"reference": "
e544e24472d4c97b2d11ade7caacd446727c6bf9
",
"shasum": ""
},
"require": {
"php": "
^
7.2.5"
"php": "
>=
7.2.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.
0
-dev"
"dev-master": "5.
1
-dev"
}
},
"autoload": {
...
...
@@ -1956,25 +1957,26 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2020-0
3
-2
7
T1
6:56:45
+00:00"
"time": "2020-0
5
-2
0
T1
7:43:50
+00:00"
},
{
"name": "symfony/debug",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "
346636d2cae417992ecfd761979b2ab98b339a45
"
"reference": "
28f92d08bb6d1fddf8158e02c194ad43870007e6
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/
346636d2cae417992ecfd761979b2ab98b339a45
",
"reference": "
346636d2cae417992ecfd761979b2ab98b339a45
",
"url": "https://api.github.com/repos/symfony/debug/zipball/
28f92d08bb6d1fddf8158e02c194ad43870007e6
",
"reference": "
28f92d08bb6d1fddf8158e02c194ad43870007e6
",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"psr/log": "~1.0"
"php": ">=7.1.3",
"psr/log": "~1.0",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"symfony/http-kernel": "<3.4"
...
...
@@ -2012,26 +2014,27 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2020-0
3
-2
7T16:54
:3
6
+00:00"
"time": "2020-0
5
-2
4T08:33
:3
5
+00:00"
},
{
"name": "symfony/error-handler",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "
7e9828fc98aa1cf27b422fe478a84f5b0abb7358
"
"reference": "
0df9a23c0f9eddbb6682479fee6fd58b88add75b
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/
7e9828fc98aa1cf27b422fe478a84f5b0abb7358
",
"reference": "
7e9828fc98aa1cf27b422fe478a84f5b0abb7358
",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/
0df9a23c0f9eddbb6682479fee6fd58b88add75b
",
"reference": "
0df9a23c0f9eddbb6682479fee6fd58b88add75b
",
"shasum": ""
},
"require": {
"php": "
^
7.1.3",
"php": "
>=
7.1.3",
"psr/log": "~1.0",
"symfony/debug": "^4.4.5",
"symfony/polyfill-php80": "^1.15",
"symfony/var-dumper": "^4.4|^5.0"
},
"require-dev": {
...
...
@@ -2068,24 +2071,24 @@
],
"description": "Symfony ErrorHandler Component",
"homepage": "https://symfony.com",
"time": "2020-0
3-30T14:07:33
+00:00"
"time": "2020-0
5-28T10:39:14
+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "a
bc8e3618bfdb55e44c8c6a00abd333f831bbfed
"
"reference": "a
5370aaa7807c7a439b21386661ffccf3dff2866
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a
bc8e3618bfdb55e44c8c6a00abd333f831bbfed
",
"reference": "a
bc8e3618bfdb55e44c8c6a00abd333f831bbfed
",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a
5370aaa7807c7a439b21386661ffccf3dff2866
",
"reference": "a
5370aaa7807c7a439b21386661ffccf3dff2866
",
"shasum": ""
},
"require": {
"php": "
^
7.1.3",
"php": "
>=
7.1.3",
"symfony/event-dispatcher-contracts": "^1.1"
},
"conflict": {
...
...
@@ -2138,7 +2141,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2020-0
3
-2
7T16:54:36
+00:00"
"time": "2020-0
5
-2
0T08:37:50
+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
...
...
@@ -2200,7 +2203,7 @@
},
{
"name": "symfony/finder",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
...
...
@@ -2249,20 +2252,20 @@
},
{
"name": "symfony/http-foundation",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "
ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2
"
"reference": "
3adfbd7098c850b02d107330b7b9deacf2581578
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/
ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2
",
"reference": "
ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2
",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/
3adfbd7098c850b02d107330b7b9deacf2581578
",
"reference": "
3adfbd7098c850b02d107330b7b9deacf2581578
",
"shasum": ""
},
"require": {
"php": "
^
7.1.3",
"php": "
>=
7.1.3",
"symfony/mime": "^4.3|^5.0",
"symfony/polyfill-mbstring": "~1.1"
},
...
...
@@ -2300,30 +2303,31 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
"time": "2020-0
4-18T20:40:08
+00:00"
"time": "2020-0
5-23T09:11:46
+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "
1799a6c01f0db5851f399151abdb5d6393fec27
7"
"reference": "
54526b598d7fc86a67850488b194a88a79ab846
7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/
1799a6c01f0db5851f399151abdb5d6393fec27
7",
"reference": "
1799a6c01f0db5851f399151abdb5d6393fec27
7",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/
54526b598d7fc86a67850488b194a88a79ab846
7",
"reference": "
54526b598d7fc86a67850488b194a88a79ab846
7",
"shasum": ""
},
"require": {
"php": "
^
7.1.3",
"php": "
>=
7.1.3",
"psr/log": "~1.0",
"symfony/error-handler": "^4.4",
"symfony/event-dispatcher": "^4.4",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-php73": "^1.9"
"symfony/polyfill-php73": "^1.9",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"symfony/browser-kit": "<4.3",
...
...
@@ -2390,26 +2394,27 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
"time": "2020-0
4-28T18:47:42
+00:00"
"time": "2020-0
5-31T05:25:51
+00:00"
},
{
"name": "symfony/mime",
"version": "v5.
0.8
",
"version": "v5.
1.0
",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
"reference": "5
d6c81c39225a750f3f43bee15f03093fb9aaa0b
"
"reference": "5
6261f89385f9d13cf843a5101ac72131190bc91
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/5
d6c81c39225a750f3f43bee15f03093fb9aaa0b
",
"reference": "5
d6c81c39225a750f3f43bee15f03093fb9aaa0b
",
"url": "https://api.github.com/repos/symfony/mime/zipball/5
6261f89385f9d13cf843a5101ac72131190bc91
",
"reference": "5
6261f89385f9d13cf843a5101ac72131190bc91
",
"shasum": ""
},
"require": {
"php": "
^
7.2.5",
"php": "
>=
7.2.5",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0"
"symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"symfony/mailer": "<4.4"
...
...
@@ -2421,7 +2426,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.
0
-dev"
"dev-master": "5.
1
-dev"
}
},
"autoload": {
...
...
@@ -2452,7 +2457,7 @@
"mime",
"mime-type"
],
"time": "2020-0
4-17T03:29
:44+00:00"
"time": "2020-0
5-25T12:33
:44+00:00"
},
{
"name": "symfony/polyfill-ctype",
...
...
@@ -2805,18 +2810,80 @@
],
"time": "2020-05-12T16:47:27+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.17.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
"reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
"shasum": ""
},
"require": {
"php": ">=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2020-05-12T16:47:27+00:00"
},
{
"name": "symfony/process",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "
4b6a9a4013baa65d409153cbb5a895bf093dc
7f
4
"
"reference": "
c714958428a85c86ab97e3a0c96db4c4f381b
7f
5
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/
4b6a9a4013baa65d409153cbb5a895bf093dc
7f
4
",
"reference": "
4b6a9a4013baa65d409153cbb5a895bf093dc
7f
4
",
"url": "https://api.github.com/repos/symfony/process/zipball/
c714958428a85c86ab97e3a0c96db4c4f381b
7f
5
",
"reference": "
c714958428a85c86ab97e3a0c96db4c4f381b
7f
5
",
"shasum": ""
},
"require": {
...
...
@@ -2852,20 +2919,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2020-0
4-15T15:56:18
+00:00"
"time": "2020-0
5-30T20:06:45
+00:00"
},
{
"name": "symfony/routing",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "
67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c
"
"reference": "
0f557911dde75c2a9652b8097bd7c9f54507f646
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/
67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c
",
"reference": "
67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c
",
"url": "https://api.github.com/repos/symfony/routing/zipball/
0f557911dde75c2a9652b8097bd7c9f54507f646
",
"reference": "
0f557911dde75c2a9652b8097bd7c9f54507f646
",
"shasum": ""
},
"require": {
...
...
@@ -2928,24 +2995,24 @@
"uri",
"url"
],
"time": "2020-0
4-21T19:59:53
+00:00"
"time": "2020-0
5-30T20:07:26
+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v2.
0.1
",
"version": "v2.
1.2
",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "
144c5e51266b281231e947b51223ba14acf1a749
"
"reference": "
66a8f0957a3ca54e4f724e49028ab19d75a8918b
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/
144c5e51266b281231e947b51223ba14acf1a749
",
"reference": "
144c5e51266b281231e947b51223ba14acf1a749
",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/
66a8f0957a3ca54e4f724e49028ab19d75a8918b
",
"reference": "
66a8f0957a3ca54e4f724e49028ab19d75a8918b
",
"shasum": ""
},
"require": {
"php": "
^
7.2.5",
"php": "
>=
7.2.5",
"psr/container": "^1.0"
},
"suggest": {
...
...
@@ -2954,7 +3021,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.
0
-dev"
"dev-master": "2.
1
-dev"
}
},
"autoload": {
...
...
@@ -2986,24 +3053,24 @@
"interoperability",
"standards"
],
"time": "20
19-11-18T17:27:11
+00:00"
"time": "20
20-05-20T17:43:50
+00:00"
},
{
"name": "symfony/translation",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "
8272bbd2b7e220ef812eba2a2b30068a5c64b191
"
"reference": "
79d3ef9096a6a6047dbc69218b68c7b7f63193af
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/
8272bbd2b7e220ef812eba2a2b30068a5c64b191
",
"reference": "
8272bbd2b7e220ef812eba2a2b30068a5c64b191
",
"url": "https://api.github.com/repos/symfony/translation/zipball/
79d3ef9096a6a6047dbc69218b68c7b7f63193af
",
"reference": "
79d3ef9096a6a6047dbc69218b68c7b7f63193af
",
"shasum": ""
},
"require": {
"php": "
^
7.1.3",
"php": "
>=
7.1.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/translation-contracts": "^1.1.6|^2"
},
...
...
@@ -3062,24 +3129,24 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
"time": "2020-0
4-12T1
6:45
:36
+00:00"
"time": "2020-0
5-30T20:0
6:45+00:00"
},
{
"name": "symfony/translation-contracts",
"version": "v2.
0.1
",
"version": "v2.
1.2
",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation-contracts.git",
"reference": "
8cc682ac458d75557203b2f2f14b0b92e1c744ed
"
"reference": "
e5ca07c8f817f865f618aa072c2fe8e0e637340e
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/
8cc682ac458d75557203b2f2f14b0b92e1c744ed
",
"reference": "
8cc682ac458d75557203b2f2f14b0b92e1c744ed
",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/
e5ca07c8f817f865f618aa072c2fe8e0e637340e
",
"reference": "
e5ca07c8f817f865f618aa072c2fe8e0e637340e
",
"shasum": ""
},
"require": {
"php": "
^
7.2.5"
"php": "
>=
7.2.5"
},
"suggest": {
"symfony/translation-implementation": ""
...
...
@@ -3087,7 +3154,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.
0
-dev"
"dev-master": "2.
1
-dev"
}
},
"autoload": {
...
...
@@ -3119,26 +3186,27 @@
"interoperability",
"standards"
],
"time": "20
19-11-18T17:27:11
+00:00"
"time": "20
20-05-20T17:43:50
+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v4.4.
8
",
"version": "v4.4.
9
",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "
c587e04ce5d1aa62d534a038f574d9a709e814cf
"
"reference": "
56b3aa5eab0ac6720dcd559fd1d590ce301594ac
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/
c587e04ce5d1aa62d534a038f574d9a709e814cf
",
"reference": "
c587e04ce5d1aa62d534a038f574d9a709e814cf
",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/
56b3aa5eab0ac6720dcd559fd1d590ce301594ac
",
"reference": "
56b3aa5eab0ac6720dcd559fd1d590ce301594ac
",
"shasum": ""
},
"require": {
"php": "
^
7.1.3",
"php": "
>=
7.1.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php72": "~1.5"
"symfony/polyfill-php72": "~1.5",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
...
...
@@ -3195,7 +3263,7 @@
"debug",
"dump"
],
"time": "2020-0
4-12T16:14:02
+00:00"
"time": "2020-0
5-30T20:06:45
+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
...
...
@@ -3313,20 +3381,20 @@
"packages-dev": [
{
"name": "doctrine/instantiator",
"version": "1.3.
0
",
"version": "1.3.
1
",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "
ae466f726242e637cebdd526a7d991b9433bacf1
"
"reference": "
f350df0268e904597e3bd9c4685c53e0e333feea
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/
ae466f726242e637cebdd526a7d991b9433bacf1
",
"reference": "
ae466f726242e637cebdd526a7d991b9433bacf1
",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/
f350df0268e904597e3bd9c4685c53e0e333feea
",
"reference": "
f350df0268e904597e3bd9c4685c53e0e333feea
",
"shasum": ""
},
"require": {
"php": "^7.1"
"php": "^7.1
|| ^8.0
"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
...
...
@@ -3365,7 +3433,7 @@
"constructor",
"instantiate"
],
"time": "20
19-10
-2
1
T1
6:45:58
+00:00"
"time": "20
20-05
-2
9
T1
7:27:14
+00:00"
},
{
"name": "facade/flare-client-php",
...
...
config/mail.php
View file @
561a6f19
...
...
@@ -133,4 +133,11 @@ return [
'log_channel'
=>
env
(
'MAIL_LOG_CHANNEL'
),
'stream'
=>
[
'ssl'
=>
[
'allow_self_signed'
=>
true
,
'verify_peer'
=>
false
,
'verify_peer_name'
=>
false
,
],
],
];
database/migrations/2020_02_05_123048_create_trabalhos_table.php
View file @
561a6f19
...
...
@@ -16,7 +16,7 @@ class CreateTrabalhosTable extends Migration
Schema
::
create
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'titulo'
);
$table
->
boolean
(
'a
vali
ado'
)
->
nullable
();
$table
->
boolean
(
'a
prov
ado'
)
->
nullable
();
$table
->
string
(
'linkGrupoPesquisa'
);
$table
->
string
(
'linkLattesEstudante'
);
$table
->
string
(
'pontuacaoPlanilha'
);
...
...
@@ -26,13 +26,15 @@ class CreateTrabalhosTable extends Migration
$table
->
string
(
'anexoDecisaoCONSU'
)
->
nullable
();
$table
->
string
(
'anexoPlanilhaPontuacao'
);
$table
->
string
(
'anexoLattesCoordenador'
);
$table
->
string
(
'anexoAutorizacaoComiteEtica'
);
$table
->
string
(
'anexoAutorizacaoComiteEtica'
)
->
nullable
();;
$table
->
string
(
'JustificativaAutorizacaoEtica'
)
->
nullable
();;
//chaves estrangeiras
$table
->
unsignedBigInteger
(
'grande_area_id'
);
$table
->
unsignedBigInteger
(
'area_id'
);
$table
->
unsignedBigInteger
(
'sub_area_id'
);
$table
->
unsignedBigInteger
(
'evento_id'
);
$table
->
unsignedBigInteger
(
'coordenador_id'
);
$table
->
unsignedBigInteger
(
'proponente_id'
);
$table
->
timestamps
();
});
...
...
database/migrations/2020_02_05_123115_create_arquivos_table.php
View file @
561a6f19
...
...
@@ -22,6 +22,7 @@ class CreateArquivosTable extends Migration
$table
->
date
(
'data'
)
->
nullable
();
$table
->
integer
(
'trabalhoId'
);
$table
->
integer
(
'participanteId'
);
});
}
...
...
Prev
1
2
3
4
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