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
02d5a421
Unverified
Commit
02d5a421
authored
Jun 25, 2020
by
Gabriel Antônio da Silva
Committed by
GitHub
Jun 25, 2020
Browse files
Merge pull request #38 from lmts-ufape/fixbugs
Fixbugs
parents
39c3da76
b9bf18a3
Changes
36
Hide whitespace changes
Inline
Side-by-side
app/Avaliador.php
View file @
02d5a421
...
@@ -21,7 +21,7 @@ class Avaliador extends Model
...
@@ -21,7 +21,7 @@ class Avaliador extends Model
return
$this
->
belongsToMany
(
'App\Trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao'
,
'created_at'
);
return
$this
->
belongsToMany
(
'App\Trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao'
,
'created_at'
);
}
}
public
function
eventos
(){
public
function
eventos
(){
return
$this
->
belongsToMany
(
'App\Evento'
);
return
$this
->
belongsToMany
(
'App\Evento'
)
->
withPivot
(
'convite'
,
'created_at'
)
;
}
}
public
function
area
(){
public
function
area
(){
return
$this
->
belongsTo
(
'App\Area'
);
return
$this
->
belongsTo
(
'App\Area'
);
...
...
app/Evento.php
View file @
02d5a421
...
@@ -41,7 +41,7 @@ class Evento extends Model
...
@@ -41,7 +41,7 @@ class Evento extends Model
return
$this
->
hasMany
(
'App\Trabalho'
);
return
$this
->
hasMany
(
'App\Trabalho'
);
}
}
public
function
avaliadors
(){
public
function
avaliadors
(){
return
$this
->
belongsToMany
(
'App\Avaliador'
);
return
$this
->
belongsToMany
(
'App\Avaliador'
)
->
withPivot
(
'convite'
,
'created_at'
)
;
}
}
...
...
app/Http/Controllers/AdministradorController.php
View file @
02d5a421
...
@@ -415,17 +415,33 @@ class AdministradorController extends Controller
...
@@ -415,17 +415,33 @@ class AdministradorController extends Controller
$nomeAvaliador
=
$request
->
nomeAvaliador
;
$nomeAvaliador
=
$request
->
nomeAvaliador
;
$emailAvaliador
=
$request
->
emailAvaliador
;
$emailAvaliador
=
$request
->
emailAvaliador
;
$tipo
=
$request
->
tipo
;
$tipo
=
$request
->
tipo
;
$user
=
User
::
where
(
'email'
,
$emailAvaliador
)
->
first
();
$passwordTemporario
=
Str
::
random
(
8
);
//existe o caso de enviar o convite de novo para um mesmo usuário
Mail
::
to
(
$emailAvaliador
)
// if(isset($user->avaliadors->eventos->where('id', $evento->id)->first()->pivot->convite) ){
->
send
(
new
EmailParaUsuarioNaoCadastrado
(
$nomeAvaliador
,
' '
,
'Avaliador'
,
$evento
->
nome
,
$passwordTemporario
));
// return redirect()->back()->with(['mensagem' => 'Usuário já recebeu um convite e está pendente']);
$user
=
User
::
create
([
// }
'email'
=>
$emailAvaliador
,
'password'
=>
bcrypt
(
$passwordTemporario
),
if
(
isset
(
$user
)){
'usuarioTemp'
=>
true
,
$passwordTemporario
=
Str
::
random
(
8
);
'name'
=>
$nomeAvaliador
,
$subject
=
"Convite para avaliar projetos da UFAPE"
;
'tipo'
=>
'avaliador'
,
Mail
::
to
(
$emailAvaliador
)
]);
->
send
(
new
EmailParaUsuarioNaoCadastrado
(
$nomeAvaliador
,
' '
,
'Avaliador-Cadastrado'
,
$evento
->
nome
,
$passwordTemporario
,
$subject
));
}
else
{
$passwordTemporario
=
Str
::
random
(
8
);
$subject
=
"Convite para avaliar projetos da UFAPE"
;
Mail
::
to
(
$emailAvaliador
)
->
send
(
new
EmailParaUsuarioNaoCadastrado
(
$nomeAvaliador
,
' '
,
'Avaliador'
,
$evento
->
nome
,
$passwordTemporario
,
$subject
));
$user
=
User
::
create
([
'email'
=>
$emailAvaliador
,
'password'
=>
bcrypt
(
$passwordTemporario
),
'usuarioTemp'
=>
true
,
'name'
=>
$nomeAvaliador
,
'tipo'
=>
'avaliador'
,
]);
}
$avaliador
=
new
Avaliador
();
$avaliador
=
new
Avaliador
();
$avaliador
->
save
();
$avaliador
->
save
();
...
...
app/Http/Controllers/AvaliadorController.php
View file @
02d5a421
...
@@ -83,4 +83,12 @@ class AvaliadorController extends Controller
...
@@ -83,4 +83,12 @@ class AvaliadorController extends Controller
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
}
}
public
function
conviteResposta
(
Request
$request
){
//dd($request->all());
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$evento
=
Evento
::
find
(
$request
->
evento_id
);
$user
->
avaliadors
->
eventos
()
->
updateExistingPivot
(
$evento
->
id
,
[
'convite'
=>
$request
->
resposta
]);
//dd( $user->avaliadors->eventos->where('id', $evento->id)->first()->pivot);
return
redirect
()
->
back
();
}
}
}
app/Http/Controllers/ParticipanteController.php
View file @
02d5a421
...
@@ -29,7 +29,7 @@ class ParticipanteController extends Controller
...
@@ -29,7 +29,7 @@ class ParticipanteController extends Controller
//$projetos = Auth::user()->participantes->where('user_id', Auth::user()->id)->first()->trabalhos;
//$projetos = Auth::user()->participantes->where('user_id', Auth::user()->id)->first()->trabalhos;
//dd(
$projeto
s);
//dd(
Auth::user()->proponente
s);
return
view
(
'participante.projetos'
)
->
with
([
'edital'
=>
$edital
,
'projetos'
=>
$projetos
]);
return
view
(
'participante.projetos'
)
->
with
([
'edital'
=>
$edital
,
'projetos'
=>
$projetos
]);
}
}
...
...
app/Http/Controllers/ProponenteController.php
View file @
02d5a421
...
@@ -19,7 +19,7 @@ class ProponenteController extends Controller
...
@@ -19,7 +19,7 @@ class ProponenteController extends Controller
}
}
public
function
create
(){
public
function
create
(){
return
view
(
'proponente.cadastro'
);
return
view
(
'proponente.cadastro'
)
->
with
([
'mensagem'
=>
'Preencha o seguinte formulário para poder submeter algum projeto.'
]);
;
}
}
public
function
editais
(){
public
function
editais
(){
...
...
app/Http/Controllers/TrabalhoController.php
View file @
02d5a421
...
@@ -31,6 +31,7 @@ use Illuminate\Support\Facades\Log;
...
@@ -31,6 +31,7 @@ use Illuminate\Support\Facades\Log;
use
Illuminate\Support\Str
;
use
Illuminate\Support\Str
;
use
App\Mail\SubmissaoTrabalho
;
use
App\Mail\SubmissaoTrabalho
;
use
App\Mail\EventoCriado
;
use
App\Mail\EventoCriado
;
use
Illuminate\Support\Facades\Validator
;
class
TrabalhoController
extends
Controller
class
TrabalhoController
extends
Controller
{
{
...
@@ -112,8 +113,7 @@ class TrabalhoController extends Controller
...
@@ -112,8 +113,7 @@ class TrabalhoController extends Controller
'area'
=>
[
'required'
,
'string'
],
'area'
=>
[
'required'
,
'string'
],
'subArea'
=>
[
'required'
,
'string'
],
'subArea'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'linkGrupo'
=>
[
'required'
,
'string'
],
'linkGrupo'
=>
[
'required'
,
'string'
,
'link_grupo'
],
// 'linkGrupo' => ['required', 'string', 'link_grupo'],
'linkLattesEstudante'
=>
[
'required'
,
'string'
,
'link_lattes'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
,
'link_lattes'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
...
@@ -125,12 +125,15 @@ class TrabalhoController extends Controller
...
@@ -125,12 +125,15 @@ class TrabalhoController extends Controller
'botao'
=>
[
'required'
],
'botao'
=>
[
'required'
],
'anexoComiteEtica'
=>
[(
$request
->
anexoComitePreenchido
!==
'sim'
&&
$request
->
anexoJustificativaPreenchido
!==
'sim'
?
'required_without:justificativaAutorizacaoEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoComiteEtica'
=>
[(
$request
->
anexoComitePreenchido
!==
'sim'
&&
$request
->
anexoJustificativaPreenchido
!==
'sim'
?
'required_without:justificativaAutorizacaoEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'justificativaAutorizacaoEtica'
=>
[(
$request
->
anexoJustificativaPreenchido
!==
'sim'
&&
$request
->
anexoComitePreenchido
!==
'sim'
?
'required_without:anexoComiteEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'justificativaAutorizacaoEtica'
=>
[(
$request
->
anexoJustificativaPreenchido
!==
'sim'
&&
$request
->
anexoComitePreenchido
!==
'sim'
?
'required_without:anexoComiteEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf,xls'
,
'max:2000000'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf,xls
,xlsx
'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
]);
]);
//dd($request->all());
if
(
gettype
(
$this
->
validarAnexosRascunho
(
$request
,
$trabalho
))
!=
'integer'
){
return
$this
->
validarAnexosRascunho
(
$request
,
$trabalho
);
}
//$trabalho = Trabalho::create([
//$trabalho = Trabalho::create([
$trabalho
[
'titulo'
]
=
$request
->
nomeProjeto
;
$trabalho
[
'titulo'
]
=
$request
->
nomeProjeto
;
$trabalho
[
'coordenador_id'
]
=
$coordenador
->
id
;
$trabalho
[
'coordenador_id'
]
=
$coordenador
->
id
;
...
@@ -145,12 +148,12 @@ class TrabalhoController extends Controller
...
@@ -145,12 +148,12 @@ class TrabalhoController extends Controller
$trabalho
[
'status'
]
=
'Submetido'
;
$trabalho
[
'status'
]
=
'Submetido'
;
$trabalho
[
'proponente_id'
]
=
$proponente
->
id
;
$trabalho
[
'proponente_id'
]
=
$proponente
->
id
;
//Anexos
//Anexos
$trabalho
[
'anexoDecisaoCONSU'
]
=
$request
->
anexoCONSU
!=
null
?
$request
->
anexoCONSU
:
""
;
$trabalho
[
'anexoDecisaoCONSU'
]
=
$request
->
anexoCONSU
!=
null
?
$request
->
anexoCONSU
:
$trabalho
->
anexoDecisaoCONSU
;
$trabalho
[
'anexoProjeto'
]
=
$request
->
anexoProjeto
!=
null
?
$request
->
anexoProjeto
:
""
;
$trabalho
[
'anexoProjeto'
]
=
$request
->
anexoProjeto
!=
null
?
$request
->
anexoProjeto
:
$trabalho
->
anexoProjeto
;
$trabalho
[
'anexoAutorizacaoComiteEtica'
]
=
$request
->
anexoComiteEtica
!=
null
?
$request
->
anexoComiteEtica
:
""
;
$trabalho
[
'anexoAutorizacaoComiteEtica'
]
=
$request
->
anexoComiteEtica
!=
null
?
$request
->
anexoComiteEtica
:
$trabalho
->
anexoAutorizacaoComiteEtica
;
$trabalho
[
'justificativaAutorizacaoEtica'
]
=
$request
->
justificativaAutorizacaoEtica
!=
null
?
$request
->
justificativaAutorizacaoEtica
:
""
;
$trabalho
[
'justificativaAutorizacaoEtica'
]
=
$request
->
justificativaAutorizacaoEtica
!=
null
?
$request
->
justificativaAutorizacaoEtica
:
$trabalho
->
justificativaAutorizacaoEtica
;
$trabalho
[
'anexoLattesCoordenador'
]
=
$request
->
anexoLattesCoordenador
!=
null
?
$request
->
anexoLattesCoordenador
:
""
;
$trabalho
[
'anexoLattesCoordenador'
]
=
$request
->
anexoLattesCoordenador
!=
null
?
$request
->
anexoLattesCoordenador
:
$trabalho
->
anexoLattesCoordenador
;
$trabalho
[
'anexoPlanilhaPontuacao'
]
=
$request
->
anexoPlanilha
!=
null
?
$request
->
anexoPlanilha
:
""
;
$trabalho
[
'anexoPlanilhaPontuacao'
]
=
$request
->
anexoPlanilha
!=
null
?
$request
->
anexoPlanilha
:
$trabalho
->
anexoPlanilhaPontuacao
;
//dd($trabalho);
//dd($trabalho);
}
else
{
}
else
{
...
@@ -162,8 +165,7 @@ class TrabalhoController extends Controller
...
@@ -162,8 +165,7 @@ class TrabalhoController extends Controller
'area'
=>
[
'required'
,
'string'
],
'area'
=>
[
'required'
,
'string'
],
'subArea'
=>
[
'required'
,
'string'
],
'subArea'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'linkGrupo'
=>
[
'required'
,
'string'
],
'linkGrupo'
=>
[
'required'
,
'string'
,
'link_grupo'
],
// 'linkGrupo' => ['required', 'string', 'link_grupo'],
'linkLattesEstudante'
=>
[
'required'
,
'string'
,
'link_lattes'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
,
'link_lattes'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
...
@@ -171,10 +173,13 @@ class TrabalhoController extends Controller
...
@@ -171,10 +173,13 @@ class TrabalhoController extends Controller
'nomePlanoTrabalho.*'
=>
[
'nullable'
,
'string'
],
'nomePlanoTrabalho.*'
=>
[
'nullable'
,
'string'
],
'anexoProjeto'
=>
[(
$request
->
anexoProjetoPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoProjeto'
=>
[(
$request
->
anexoProjetoPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf,xls'
,
'max:2000000'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf,xls
,xlsx
'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
]);
]);
if
(
gettype
(
$this
->
validarAnexosRascunho
(
$request
,
$trabalho
))
!=
'integer'
){
return
$this
->
validarAnexosRascunho
(
$request
,
$trabalho
);
}
//$trabalho = Trabalho::create([
//$trabalho = Trabalho::create([
$trabalho
[
'titulo'
]
=
$request
->
nomeProjeto
;
$trabalho
[
'titulo'
]
=
$request
->
nomeProjeto
;
$trabalho
[
'coordenador_id'
]
=
$coordenador
->
id
;
$trabalho
[
'coordenador_id'
]
=
$coordenador
->
id
;
...
@@ -206,8 +211,9 @@ class TrabalhoController extends Controller
...
@@ -206,8 +211,9 @@ class TrabalhoController extends Controller
$participante
=
new
Participante
();
$participante
=
new
Participante
();
if
(
$userParticipante
==
null
){
if
(
$userParticipante
==
null
){
$passwordTemporario
=
Str
::
random
(
8
);
$passwordTemporario
=
Str
::
random
(
8
);
Mail
::
to
(
$value
)
->
send
(
new
EmailParaUsuarioNaoCadastrado
(
Auth
()
->
user
()
->
name
,
' '
,
'Participante'
,
$evento
->
nome
,
$passwordTemporario
));
$subject
=
"Participante de Projeto"
;
Mail
::
to
(
$value
)
->
send
(
new
EmailParaUsuarioNaoCadastrado
(
Auth
()
->
user
()
->
name
,
$request
->
nomeProjeto
,
'Participante'
,
$evento
->
nome
,
$passwordTemporario
,
$subject
));
$usuario
=
User
::
create
([
$usuario
=
User
::
create
([
'email'
=>
$value
,
'email'
=>
$value
,
'password'
=>
bcrypt
(
$passwordTemporario
),
'password'
=>
bcrypt
(
$passwordTemporario
),
...
@@ -249,6 +255,8 @@ class TrabalhoController extends Controller
...
@@ -249,6 +255,8 @@ class TrabalhoController extends Controller
$file
=
$request
->
anexoPlanoTrabalho
[
$key
];
$file
=
$request
->
anexoPlanoTrabalho
[
$key
];
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
$arquivo
=
new
Arquivo
();
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
nome
=
$path
.
$nome
;
...
@@ -305,8 +313,8 @@ class TrabalhoController extends Controller
...
@@ -305,8 +313,8 @@ class TrabalhoController extends Controller
//---Dados do Projeto
//---Dados do Projeto
$trabalho
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
where
(
'evento_id'
,
$request
->
editalId
)
->
where
(
'status'
,
'Rascunho'
)
$trabalho
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
where
(
'evento_id'
,
$request
->
editalId
)
->
where
(
'status'
,
'Rascunho'
)
->
orderByDesc
(
'updated_at'
)
->
first
();
->
orderByDesc
(
'updated_at'
)
->
first
();
//
dd($trabalho);
//dd($trabalho);
if
(
$trabalho
==
null
){
if
(
$trabalho
==
null
){
$trabalho
=
new
Trabalho
();
$trabalho
=
new
Trabalho
();
$trabalho
->
proponente_id
=
$proponente
->
id
;
$trabalho
->
proponente_id
=
$proponente
->
id
;
$trabalho
->
evento_id
=
$request
->
editalId
;
$trabalho
->
evento_id
=
$request
->
editalId
;
...
@@ -319,7 +327,7 @@ class TrabalhoController extends Controller
...
@@ -319,7 +327,7 @@ class TrabalhoController extends Controller
$trabalho
->
fill
(
$trabalho
->
fill
(
array_fill_keys
(
$stringKeys
,
""
)
+
array_fill_keys
(
$intKeys
,
1
)
array_fill_keys
(
$stringKeys
,
""
)
+
array_fill_keys
(
$intKeys
,
1
)
)
->
save
();
)
->
save
();
//
dd($trabalho);
//dd($trabalho);
}
}
if
(
!
(
is_null
(
$request
->
nomeProjeto
))
)
{
if
(
!
(
is_null
(
$request
->
nomeProjeto
))
)
{
...
@@ -368,42 +376,130 @@ class TrabalhoController extends Controller
...
@@ -368,42 +376,130 @@ class TrabalhoController extends Controller
//---Anexos planos de trabalho
//---Anexos planos de trabalho
//dd($trabalho);
return
$trabalho
;
return
$trabalho
;
}
}
public
function
validarAnexosRascunho
(
Request
$request
,
$trabalho
){
//dd($trabalho->getAttributes());
$validator
=
Validator
::
make
(
$trabalho
->
getAttributes
(),[
'anexoPlanilhaPontuacao'
=>
$request
->
anexoPlanilha
==
null
?
[
'planilha'
]
:
[],
]);
if
(
$validator
->
fails
())
{
dd
(
'asdf'
);
return
back
()
->
withErrors
(
$validator
)
->
withInput
();
}
return
1
;
}
public
function
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
){
public
function
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
){
// Anexo Projeto
// Anexo Projeto
if
(
(
!
isset
(
$request
->
anexoProjeto
)
&&
$request
->
anexoProjetoPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoProjeto
)){
if
(
isset
(
$request
->
anexoProjeto
)){
$trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
'Projeto.pdf'
);
$trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
'Projeto.pdf'
);
}
}
//Anexo Decisão CONSU
//Anexo Decisão CONSU
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
)
{
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
)
{
if
(
(
!
isset
(
$request
->
anexoCONSU
)
&&
$request
->
anexoConsuPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoCONSU
)){
if
(
isset
(
$request
->
anexoCONSU
)){
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
'CONSU.pdf'
);
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
'CONSU.pdf'
);
}
}
}
}
//Autorização ou Justificativa
//Autorização ou Justificativa
if
(
(
!
isset
(
$request
->
anexoComiteEtica
)
&&
$request
->
anexoComitePreenchido
==
'sim'
)
||
isset
(
$request
->
anexoComiteEtica
)){
if
(
isset
(
$request
->
anexoComiteEtica
)){
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
'Comite_de_etica.pdf'
);
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
'Comite_de_etica.pdf'
);
}
elseif
(
(
!
isset
(
$request
->
justificativaAutorizacaoEtica
)
&&
$request
->
anexoJustificativaPreenchido
==
'sim'
)
||
isset
(
$request
->
justificativaAutorizacaoEtica
)){
}
elseif
(
isset
(
$request
->
justificativaAutorizacaoEtica
)){
$trabalho
->
justificativaAutorizacaoEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
justificativaAutorizacaoEtica
,
'Justificativa.pdf'
);
$trabalho
->
justificativaAutorizacaoEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
justificativaAutorizacaoEtica
,
'Justificativa.pdf'
);
}
}
//Anexo Lattes
//Anexo Lattes
if
(
(
!
isset
(
$request
->
anexoLattesCoordenador
)
&&
$request
->
anexoLattesPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoLattesCoordenador
)){
if
(
isset
(
$request
->
anexoLattesCoordenador
)){
$trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLattesCoordenador
,
'Lattes_Coordenador.pdf'
);
$trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLattesCoordenador
,
'Lattes_Coordenador.pdf'
);
}
}
//Anexo Planilha
//Anexo Planilha
if
(
(
!
isset
(
$request
->
anexoPlanilha
)
&&
$request
->
anexoPlanilhaPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoPlanilha
)){
if
(
isset
(
$request
->
anexoPlanilha
)){
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha."
.
$request
->
file
(
'anexoPlanilha'
)
->
extension
());
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha."
.
$request
->
file
(
'anexoPlanilha'
)
->
extension
());
}
}
$trabalho
->
update
();
$trabalho
->
update
();
//Planos de trabalho
//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
();
// Se participante ainda não existe
if
(
$userParticipante
==
null
){
$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
->
user_id
=
$usuario
->
id
;
$participante
->
trabalho_id
=
$trabalho
->
id
;
$participante
->
funcao_participante_id
=
$request
->
funcaoParticipante
[
$key
];
$participante
->
save
();
$usuario
->
participantes
()
->
save
(
$participante
);
$usuario
->
save
();
$participante
->
trabalhos
()
->
save
(
$trabalho
);
}
else
{
$participante
->
user_id
=
$userParticipante
->
id
;
$participante
->
trabalho_id
=
$trabalho
->
id
;
$participante
->
funcao_participante_id
=
$request
->
funcaoParticipante
[
$key
];
$participante
->
save
();
$userParticipante
->
participantes
()
->
save
(
$participante
);
$userParticipante
->
save
();
$participante
->
trabalhos
()
->
save
(
$trabalho
);
$subject
=
"Participante de Projeto"
;
$email
=
$value
;
// Mail::to($email)
// ->send(new SubmissaoTrabalho($userParticipante, $subject, $evento, $trabalho));
}
if
(
$request
->
nomePlanoTrabalho
[
$key
]
!=
null
){
$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
);
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
$arquivo
->
participanteId
=
$participante
->
id
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
}
}
}
return
$trabalho
;
return
$trabalho
;
}
}
/**
/**
...
@@ -870,6 +966,7 @@ class TrabalhoController extends Controller
...
@@ -870,6 +966,7 @@ class TrabalhoController extends Controller
public
function
baixarAnexoProjeto
(
$id
)
{
public
function
baixarAnexoProjeto
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
$projeto
=
Trabalho
::
find
(
$id
);
//dd($projeto);
if
(
Storage
::
disk
()
->
exists
(
$projeto
->
anexoProjeto
))
{
if
(
Storage
::
disk
()
->
exists
(
$projeto
->
anexoProjeto
))
{
return
Storage
::
download
(
$projeto
->
anexoProjeto
);
return
Storage
::
download
(
$projeto
->
anexoProjeto
);
}
}
...
...
app/Mail/EmailParaUsuarioNaoCadastrado.php
View file @
02d5a421
...
@@ -15,19 +15,21 @@ class EmailParaUsuarioNaoCadastrado extends Mailable
...
@@ -15,19 +15,21 @@ class EmailParaUsuarioNaoCadastrado extends Mailable
public
$nomeFuncao
;
public
$nomeFuncao
;
public
$nomeEvento
;
public
$nomeEvento
;
public
$senhaTemporaria
;
public
$senhaTemporaria
;
public
$subject
;
/**
/**
* Create a new message instance.
* Create a new message instance.
*
*
* @return void
* @return void
*/
*/
public
function
__construct
(
String
$nomeUsuarioPai
,
String
$nomeTrabalho
,
String
$nomeFuncao
,
String
$nomeEvento
,
String
$senhaTemporaria
)
public
function
__construct
(
String
$nomeUsuarioPai
,
String
$nomeTrabalho
,
String
$nomeFuncao
,
String
$nomeEvento
,
String
$senhaTemporaria
,
String
$subject
)
{
{
$this
->
nomeUsuarioPai
=
$nomeUsuarioPai
;
$this
->
nomeUsuarioPai
=
$nomeUsuarioPai
;
$this
->
nomeTrabalho
=
$nomeTrabalho
;
$this
->
nomeTrabalho
=
$nomeTrabalho
;
$this
->
nomeFuncao
=
$nomeFuncao
;
$this
->
nomeFuncao
=
$nomeFuncao
;
$this
->
nomeEvento
=
$nomeEvento
;
$this
->
nomeEvento
=
$nomeEvento
;
$this
->
senhaTemporaria
=
$senhaTemporaria
;
$this
->
senhaTemporaria
=
$senhaTemporaria
;
$this
->
subject
=
$subject
;
}
}
/**
/**
...
@@ -37,6 +39,17 @@ class EmailParaUsuarioNaoCadastrado extends Mailable
...
@@ -37,6 +39,17 @@ class EmailParaUsuarioNaoCadastrado extends Mailable
*/
*/
public
function
build
()
public
function
build
()
{
{
return
$this
->
view
(
'emails.usuarioNaoCadastrado'
);
return
$this
->
from
(
'lmtsteste@gmail.com'
,
'Submeta - LMTS'
)
->
subject
(
$this
->
subject
)
->
view
(
'emails.usuarioNaoCadastrado'
)
->
with
([
'nomeUsuarioPai'
=>
$this
->
nomeUsuarioPai
,
'nomeTrabalho'
=>
$this
->
nomeTrabalho
,
'nomeFuncao'
=>
$this
->
nomeFuncao
,
'nomeEvento'
=>
$this
->
nomeEvento
,
'senhaTemporaria'
=>
$this
->
senhaTemporaria
]);
}
}
}
}
app/Providers/AppServiceProvider.php
View file @
02d5a421
...
@@ -27,5 +27,6 @@ class AppServiceProvider extends ServiceProvider
...
@@ -27,5 +27,6 @@ class AppServiceProvider extends ServiceProvider
Validator
::
extend
(
'cpf'
,
'\App\Utils\CpfValidation@validate'
);
Validator
::
extend
(
'cpf'
,
'\App\Utils\CpfValidation@validate'
);
Validator
::
extend
(
'link_lattes'
,
'\App\Utils\LattesValidation@validate'
,
'Link inválido'
);
Validator
::
extend
(
'link_lattes'
,
'\App\Utils\LattesValidation@validate'
,
'Link inválido'
);
Validator
::
extend
(
'link_grupo'
,
'\App\Utils\GrupoPesquisaValidation@validate'
,
'Link inválido'
);
Validator
::
extend
(
'link_grupo'
,
'\App\Utils\GrupoPesquisaValidation@validate'
,
'Link inválido'
);
Validator
::
extend
(
'planilha'
,
'\App\Utils\ExtensaoValidation@validate'
,
'Extensão do arquivo é inválida'
);
}
}
}
}
app/Utils/ExtensaoValidation.php
0 → 100644
View file @
02d5a421
<?php
namespace
App\Utils
;
class
ExtensaoValidation
{
public
function
validate
(
$attribute
,
$value
,
$parameters
,
$validator
)
{
$extensions
=
array
(
"xls"
,
"xlsx"
,
"pdf"
);
$result
=
pathinfo
(
$value
)[
'extension'
];
if
(
!
in_array
(
$result
,
$extensions
)){
return
false
;
}
return
true
;
}
}
\ No newline at end of file
composer.lock
View file @
02d5a421
...
@@ -292,16 +292,16 @@
...
@@ -292,16 +292,16 @@
},
},
{
{
"name": "fideloper/proxy",
"name": "fideloper/proxy",
"version": "4.
3
.0",
"version": "4.
4
.0",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/fideloper/TrustedProxy.git",
"url": "https://github.com/fideloper/TrustedProxy.git",
"reference": "
ec38ad69ee378a1eec04fb0e417a97cfaf7ed1
1a"
"reference": "
9beebf48a1c344ed67c1d36bb1b8709db7c3c
1a
8
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/
ec38ad69ee378a1eec04fb0e417a97cfaf7ed1
1a",
"url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/
9beebf48a1c344ed67c1d36bb1b8709db7c3c
1a
8
",
"reference": "
ec38ad69ee378a1eec04fb0e417a97cfaf7ed1
1a",
"reference": "
9beebf48a1c344ed67c1d36bb1b8709db7c3c
1a
8
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -342,7 +342,7 @@
...
@@ -342,7 +342,7 @@
"proxy",
"proxy",
"trusted proxy"
"trusted proxy"
],
],
"time": "2020-0
2
-2
2
T01:
51
:47+00:00"
"time": "2020-0
6
-2
3
T01:
36
:47+00:00"
},
},
{
{
"name": "geekcom/validator-docs",
"name": "geekcom/validator-docs",
...
@@ -586,16 +586,16 @@
...
@@ -586,16 +586,16 @@
},
},
{
{
"name": "laravel/framework",
"name": "laravel/framework",
"version": "v6.18.2
0
",
"version": "v6.18.2
2
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/laravel/framework.git",
"url": "https://github.com/laravel/framework.git",
"reference": "
2862a9857533853bb2851bac39d65e3bfb8ba6cd
"
"reference": "
95f33151375bb2e4747b871854c8becc23502901
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/
2862a9857533853bb2851bac39d65e3bfb8ba6cd
",
"url": "https://api.github.com/repos/laravel/framework/zipball/
95f33151375bb2e4747b871854c8becc23502901
",
"reference": "
2862a9857533853bb2851bac39d65e3bfb8ba6cd
",
"reference": "
95f33151375bb2e4747b871854c8becc23502901
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -730,7 +730,7 @@
...
@@ -730,7 +730,7 @@
"framework",
"framework",
"laravel"
"laravel"
],
],
"time": "2020-06-
16
T13:
21:33
+00:00"
"time": "2020-06-
24
T13:
08:51
+00:00"
},
},
{
{
"name": "laravel/tinker",
"name": "laravel/tinker",
...
@@ -852,21 +852,21 @@
...
@@ -852,21 +852,21 @@
},
},
{
{
"name": "league/commonmark",
"name": "league/commonmark",
"version": "1.
4.3
",
"version": "1.
5.0
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "
412639f7cfbc0b31ad2455b2fe965095f66ae505
"
"reference": "
fc33ca12575e98e57cdce7d5f38b2ca5335714b3
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/
412639f7cfbc0b31ad2455b2fe965095f66ae505
",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/
fc33ca12575e98e57cdce7d5f38b2ca5335714b3
",
"reference": "
412639f7cfbc0b31ad2455b2fe965095f66ae505
",
"reference": "
fc33ca12575e98e57cdce7d5f38b2ca5335714b3
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
"ext-mbstring": "*",
"ext-mbstring": "*",
"php": "^7.1"
"php": "^7.1
|| ^8.0
"
},
},
"conflict": {
"conflict": {
"scrutinizer/ocular": "1.7.*"
"scrutinizer/ocular": "1.7.*"
...
@@ -888,11 +888,6 @@
...
@@ -888,11 +888,6 @@
"bin/commonmark"
"bin/commonmark"
],
],
"type": "library",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"autoload": {
"psr-4": {
"psr-4": {
"League\\CommonMark\\": "src"
"League\\CommonMark\\": "src"
...
@@ -922,7 +917,7 @@
...
@@ -922,7 +917,7 @@
"md",
"md",
"parser"
"parser"
],
],
"time": "2020-0
5-04T22:15:21
+00:00"
"time": "2020-0
6-21T20:50:13
+00:00"
},
},
{
{
"name": "league/flysystem",
"name": "league/flysystem",
...
@@ -2462,16 +2457,16 @@
...
@@ -2462,16 +2457,16 @@
},
},
{
{
"name": "symfony/polyfill-ctype",
"name": "symfony/polyfill-ctype",
"version": "v1.17.
0
",
"version": "v1.17.
1
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "
e94c8b1bbe2bc77507a1056cdb06451c75b427f9
"
"reference": "
2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/
e94c8b1bbe2bc77507a1056cdb06451c75b427f9
",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/
2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d
",
"reference": "
e94c8b1bbe2bc77507a1056cdb06451c75b427f9
",
"reference": "
2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -2484,6 +2479,10 @@
...
@@ -2484,6 +2479,10 @@
"extra": {
"extra": {
"branch-alias": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.17-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
},
},
"autoload": {
"autoload": {
...
@@ -2516,20 +2515,20 @@
...
@@ -2516,20 +2515,20 @@
"polyfill",
"polyfill",
"portable"
"portable"
],
],
"time": "2020-0
5-12T16:14:59
+00:00"
"time": "2020-0
6-06T08:46:27
+00:00"
},
},
{
{
"name": "symfony/polyfill-iconv",
"name": "symfony/polyfill-iconv",
"version": "v1.17.
0
",
"version": "v1.17.
1
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
"url": "https://github.com/symfony/polyfill-iconv.git",
"reference": "
c4de7601eefbf25f9d47190abe07f79fe0a27424
"
"reference": "
ba6c9c18db36235b859cc29b8372d1c01298c035
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/
c4de7601eefbf25f9d47190abe07f79fe0a27424
",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/
ba6c9c18db36235b859cc29b8372d1c01298c035
",
"reference": "
c4de7601eefbf25f9d47190abe07f79fe0a27424
",
"reference": "
ba6c9c18db36235b859cc29b8372d1c01298c035
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -2542,6 +2541,10 @@
...
@@ -2542,6 +2541,10 @@
"extra": {
"extra": {
"branch-alias": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.17-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
},
},
"autoload": {
"autoload": {
...
@@ -2575,20 +2578,20 @@
...
@@ -2575,20 +2578,20 @@
"portable",
"portable",
"shim"
"shim"
],
],
"time": "2020-0
5-12T16
:4
7
:27+00:00"
"time": "2020-0
6-06T08
:4
6
:27+00:00"
},
},
{
{
"name": "symfony/polyfill-intl-idn",
"name": "symfony/polyfill-intl-idn",
"version": "v1.17.
0
",
"version": "v1.17.
1
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "
3bff59ea7047e925be6b7f2059d60af31bb46d6a
"
"reference": "
a57f8161502549a742a63c09f0a604997bf47027
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/
3bff59ea7047e925be6b7f2059d60af31bb46d6a
",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/
a57f8161502549a742a63c09f0a604997bf47027
",
"reference": "
3bff59ea7047e925be6b7f2059d60af31bb46d6a
",
"reference": "
a57f8161502549a742a63c09f0a604997bf47027
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -2603,6 +2606,10 @@
...
@@ -2603,6 +2606,10 @@
"extra": {
"extra": {
"branch-alias": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.17-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
},
},
"autoload": {
"autoload": {
...
@@ -2637,20 +2644,20 @@
...
@@ -2637,20 +2644,20 @@
"portable",
"portable",
"shim"
"shim"
],
],
"time": "2020-0
5-12T16
:4
7
:27+00:00"
"time": "2020-0
6-06T08
:4
6
:27+00:00"
},
},
{
{
"name": "symfony/polyfill-mbstring",
"name": "symfony/polyfill-mbstring",
"version": "v1.17.
0
",
"version": "v1.17.
1
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "
fa79b11539418b02fc5e1897267673ba2c19419c
"
"reference": "
7110338d81ce1cbc3e273136e4574663627037a7
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/
fa79b11539418b02fc5e1897267673ba2c19419c
",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/
7110338d81ce1cbc3e273136e4574663627037a7
",
"reference": "
fa79b11539418b02fc5e1897267673ba2c19419c
",
"reference": "
7110338d81ce1cbc3e273136e4574663627037a7
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -2663,6 +2670,10 @@
...
@@ -2663,6 +2670,10 @@
"extra": {
"extra": {
"branch-alias": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.17-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
},
},
"autoload": {
"autoload": {
...
@@ -2696,7 +2707,7 @@
...
@@ -2696,7 +2707,7 @@
"portable",
"portable",
"shim"
"shim"
],
],
"time": "2020-0
5-12T16
:4
7
:27+00:00"
"time": "2020-0
6-06T08
:4
6
:27+00:00"
},
},
{
{
"name": "symfony/polyfill-php72",
"name": "symfony/polyfill-php72",
...
@@ -2755,16 +2766,16 @@
...
@@ -2755,16 +2766,16 @@
},
},
{
{
"name": "symfony/polyfill-php73",
"name": "symfony/polyfill-php73",
"version": "v1.17.
0
",
"version": "v1.17.
1
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "
a760d8964ff79ab9bf057613a5808284ec852ccc
"
"reference": "
fa0837fe02d617d31fbb25f990655861bb27bd1a
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/
a760d8964ff79ab9bf057613a5808284ec852ccc
",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/
fa0837fe02d617d31fbb25f990655861bb27bd1a
",
"reference": "
a760d8964ff79ab9bf057613a5808284ec852ccc
",
"reference": "
fa0837fe02d617d31fbb25f990655861bb27bd1a
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -2774,6 +2785,10 @@
...
@@ -2774,6 +2785,10 @@
"extra": {
"extra": {
"branch-alias": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.17-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
},
},
"autoload": {
"autoload": {
...
@@ -2809,20 +2824,20 @@
...
@@ -2809,20 +2824,20 @@
"portable",
"portable",
"shim"
"shim"
],
],
"time": "2020-0
5-12T16
:4
7
:27+00:00"
"time": "2020-0
6-06T08
:4
6
:27+00:00"
},
},
{
{
"name": "symfony/polyfill-php80",
"name": "symfony/polyfill-php80",
"version": "v1.17.
0
",
"version": "v1.17.
1
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "
5e30b2799bc1ad68f7feb62b60a73743589438dd
"
"reference": "
4a5b6bba3259902e386eb80dd1956181ee90b5b2
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/
5e30b2799bc1ad68f7feb62b60a73743589438dd
",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/
4a5b6bba3259902e386eb80dd1956181ee90b5b2
",
"reference": "
5e30b2799bc1ad68f7feb62b60a73743589438dd
",
"reference": "
4a5b6bba3259902e386eb80dd1956181ee90b5b2
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -2832,6 +2847,10 @@
...
@@ -2832,6 +2847,10 @@
"extra": {
"extra": {
"branch-alias": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.17-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
},
},
"autoload": {
"autoload": {
...
@@ -2871,7 +2890,7 @@
...
@@ -2871,7 +2890,7 @@
"portable",
"portable",
"shim"
"shim"
],
],
"time": "2020-0
5-12T16
:4
7
:27+00:00"
"time": "2020-0
6-06T08
:4
6
:27+00:00"
},
},
{
{
"name": "symfony/process",
"name": "symfony/process",
...
@@ -4240,16 +4259,16 @@
...
@@ -4240,16 +4259,16 @@
},
},
{
{
"name": "phpdocumentor/type-resolver",
"name": "phpdocumentor/type-resolver",
"version": "1.
1
.0",
"version": "1.
2
.0",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "
7462d5f123dfc080dfdf26897032a6513644fc95
"
"reference": "
30441f2752e493c639526b215ed81d54f369d693
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/
7462d5f123dfc080dfdf26897032a6513644fc95
",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/
30441f2752e493c639526b215ed81d54f369d693
",
"reference": "
7462d5f123dfc080dfdf26897032a6513644fc95
",
"reference": "
30441f2752e493c639526b215ed81d54f369d693
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -4263,7 +4282,7 @@
...
@@ -4263,7 +4282,7 @@
"type": "library",
"type": "library",
"extra": {
"extra": {
"branch-alias": {
"branch-alias": {
"dev-
master
": "1.x-dev"
"dev-
1.x
": "1.x-dev"
}
}
},
},
"autoload": {
"autoload": {
...
@@ -4282,7 +4301,7 @@
...
@@ -4282,7 +4301,7 @@
}
}
],
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"time": "2020-0
2
-1
8T18:59:58
+00:00"
"time": "2020-0
6
-1
9T20:22:09
+00:00"
},
},
{
{
"name": "phpspec/prophecy",
"name": "phpspec/prophecy",
...
@@ -4601,16 +4620,16 @@
...
@@ -4601,16 +4620,16 @@
},
},
{
{
"name": "phpunit/phpunit",
"name": "phpunit/phpunit",
"version": "8.5.
6
",
"version": "8.5.
8
",
"source": {
"source": {
"type": "git",
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "3
f9c4079d1407cd84c51c02c6ad1df6ec2ed1348
"
"reference": "3
4c18baa6a44f1d1fbf0338907139e9dce95b997
"
},
},
"dist": {
"dist": {
"type": "zip",
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3
f9c4079d1407cd84c51c02c6ad1df6ec2ed1348
",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3
4c18baa6a44f1d1fbf0338907139e9dce95b997
",
"reference": "3
f9c4079d1407cd84c51c02c6ad1df6ec2ed1348
",
"reference": "3
4c18baa6a44f1d1fbf0338907139e9dce95b997
",
"shasum": ""
"shasum": ""
},
},
"require": {
"require": {
...
@@ -4680,7 +4699,7 @@
...
@@ -4680,7 +4699,7 @@
"testing",
"testing",
"xunit"
"xunit"
],
],
"time": "2020-06-
15T10:45:47
+00:00"
"time": "2020-06-
22T07:06:58
+00:00"
},
},
{
{
"name": "scrivo/highlight.php",
"name": "scrivo/highlight.php",
...
...
database/migrations/2020_05_26_223341_create_avaliadors_trabalhos_table.php
View file @
02d5a421
...
@@ -19,7 +19,7 @@ class CreateAvaliadorsTrabalhosTable extends Migration
...
@@ -19,7 +19,7 @@ class CreateAvaliadorsTrabalhosTable extends Migration
$table
->
text
(
'parecer'
)
->
nullable
();
$table
->
text
(
'parecer'
)
->
nullable
();
$table
->
string
(
'AnexoParecer'
)
->
nullable
();
$table
->
string
(
'AnexoParecer'
)
->
nullable
();
$table
->
boolean
(
'status'
)
->
nullable
();
$table
->
boolean
(
'status'
)
->
nullable
();
$table
->
string
(
'recomendacao'
)
->
nullable
();
$table
->
string
(
'recomendacao'
)
->
nullable
();
$table
->
softDeletes
();
$table
->
softDeletes
();
...
...
database/migrations/2020_06_01_183609_create_avaliadors_eventos_table.php
View file @
02d5a421
...
@@ -17,6 +17,8 @@ class CreateAvaliadorsEventosTable extends Migration
...
@@ -17,6 +17,8 @@ class CreateAvaliadorsEventosTable extends Migration
$table
->
bigIncrements
(
'id'
);
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
timestamps
();
$table
->
boolean
(
'convite'
)
->
nullable
();
$table
->
unsignedBigInteger
(
'avaliador_id'
);
$table
->
unsignedBigInteger
(
'avaliador_id'
);
$table
->
unsignedBigInteger
(
'evento_id'
);
$table
->
unsignedBigInteger
(
'evento_id'
);
...
...
database/seeds/DatabaseSeeder.php
View file @
02d5a421
...
@@ -15,7 +15,7 @@ class DatabaseSeeder extends Seeder
...
@@ -15,7 +15,7 @@ class DatabaseSeeder extends Seeder
$this
->
call
(
UsuarioSeeder
::
class
);
$this
->
call
(
UsuarioSeeder
::
class
);
$this
->
call
(
AdministradorSeeder
::
class
);
$this
->
call
(
AdministradorSeeder
::
class
);
$this
->
call
(
AdministradorResponsavelSeeder
::
class
);
$this
->
call
(
AdministradorResponsavelSeeder
::
class
);
//$this->call(ProponenteSeeder::class);
//
$this->call(ProponenteSeeder::class);
$this
->
call
(
GrandeAreaSeeder
::
class
);
$this
->
call
(
GrandeAreaSeeder
::
class
);
$this
->
call
(
AreaSeeder
::
class
);
$this
->
call
(
AreaSeeder
::
class
);
$this
->
call
(
SubAreaSeeder
::
class
);
$this
->
call
(
SubAreaSeeder
::
class
);
...
@@ -80,8 +80,8 @@ class DatabaseSeeder extends Seeder
...
@@ -80,8 +80,8 @@ class DatabaseSeeder extends Seeder
// 'inicioSubmissao'=>'2020-03-30',
// 'inicioSubmissao'=>'2020-03-30',
// 'fimSubmissao'=>'2020-09-20',
// 'fimSubmissao'=>'2020-09-20',
// 'inicioRevisao'=>'2020-04-21',
// 'inicioRevisao'=>'2020-04-21',
// 'fimRevisao'=>'2020-0
5
-21',
// 'fimRevisao'=>'2020-0
7
-21',
// 'resultado'=>'2020-0
5
-22',
// 'resultado'=>'2020-0
7
-22',
// 'numMaxTrabalhos' => 2,
// 'numMaxTrabalhos' => 2,
// 'numMaxCoautores' => 5,
// 'numMaxCoautores' => 5,
// 'coordenadorId'=>1,
// 'coordenadorId'=>1,
...
...
database/seeds/UsuarioSeeder.php
View file @
02d5a421
...
@@ -48,14 +48,14 @@ class UsuarioSeeder extends Seeder
...
@@ -48,14 +48,14 @@ class UsuarioSeeder extends Seeder
'email_verified_at'
=>
'2020-01-01'
'email_verified_at'
=>
'2020-01-01'
]);
]);
//
DB::table('users')->insert([
DB
::
table
(
'users'
)
->
insert
([
//
'name'=>'Gabriel',
'name'
=>
'Gabriel'
,
//
'email'=>'gabriel.uag.ufrpe@gmail.com',
'email'
=>
'gabriel.uag.ufrpe@gmail.com'
,
//
'password'=>Hash::make('12345678'),
'password'
=>
Hash
::
make
(
'12345678'
),
//
'tipo'=>'proponente',
'tipo'
=>
'proponente'
,
//
'email_verified_at'=>'2020-01-01'
'email_verified_at'
=>
'2020-01-01'
//
]);
]);
DB
::
table
(
'users'
)
->
insert
([
DB
::
table
(
'users'
)
->
insert
([
...
...
public/img/icons/local_logo.svg
0 → 100644
View file @
02d5a421
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"20.594"
height=
"27.459"
viewBox=
"0 0 20.594 27.459"
>
<path
id=
"Icon_awesome-map-marker-alt"
data-name=
"Icon awesome-map-marker-alt"
d=
"M9.239,26.9C1.446,15.608,0,14.449,0,10.3a10.3,10.3,0,0,1,20.594,0c0,4.152-1.446,5.311-9.239,16.608a1.288,1.288,0,0,1-2.116,0ZM10.3,14.587a4.29,4.29,0,1,0-4.29-4.29A4.29,4.29,0,0,0,10.3,14.587Z"
fill=
"#fff"
/>
</svg>
resources/views/administrador/editais.blade.php
View file @
02d5a421
...
@@ -62,39 +62,40 @@
...
@@ -62,39 +62,40 @@
@
endif
@
endif
</
td
>
</
td
>
</
tr
>
</
tr
>
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"exampleModal"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Deletar
edital
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
<
p
>
Você
tem
certeza
que
deseja
deletar
o
edital
:
{{
$evento
->
nome
}}
?</
p
>
</
div
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
dismiss
=
"modal"
>
Cancelar
</
button
>
<
form
method
=
"POST"
action
=
"
{
{route('evento.deletar',$evento->id)}
}
"
class
=
"text-center"
>
{{
csrf_field
()
}}
{{
method_field
(
'DELETE'
)
}}
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
Deletar
</
button
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
@
endforeach
</
tbody
>
</
tbody
>
</
table
>
</
table
>
</
div
>
</
div
>
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"exampleModal"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Deletar
edital
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
<
p
>
Você
tem
certeza
que
deseja
deletar
o
edital
:
{{
$evento
->
nome
}}
?</
p
>
</
div
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
dismiss
=
"modal"
>
Cancelar
</
button
>
<
form
method
=
"POST"
action
=
"
{
{route('evento.deletar',$evento->id)}
}
"
class
=
"text-center"
>
{{
csrf_field
()
}}
{{
method_field
(
'DELETE'
)
}}
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
Deletar
</
button
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
@
endsection
...
...
resources/views/administrador/index.blade.php
View file @
02d5a421
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<
div
class
=
"container"
>
<
div
class
=
"container"
>
<
h2
style
=
"margin-top: 100px; "
>
{{
Auth
()
->
user
()
->
name
}}
</
h2
>
<
h2
style
=
"margin-top: 100px; "
>
{{
Auth
()
->
user
()
->
name
}}
-
Perfil
:
Administrador
</
h2
>
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
div
class
=
"col-sm-3 d-flex justify-content-center "
>
<
div
class
=
"col-sm-3 d-flex justify-content-center "
>
...
...
resources/views/administrador/selecionarAvaliadores.blade.php
View file @
02d5a421
...
@@ -41,7 +41,14 @@
...
@@ -41,7 +41,14 @@
<
tr
>
<
tr
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
{{
$avaliador
->
area
->
nome
}}
</
td
>
<
td
>
@
if
(
is_null
(
$avaliador
->
area
))
Indefinida
@
else
{{
$avaliador
->
area
->
nome
}}
@
endif
</
td
>
<
td
style
=
"text-align:center"
>
<
td
style
=
"text-align:center"
>
<
form
action
=
"{{ route('admin.adicionar') }}"
method
=
"POST"
>
<
form
action
=
"{{ route('admin.adicionar') }}"
method
=
"POST"
>
@
csrf
@
csrf
...
@@ -77,7 +84,15 @@
...
@@ -77,7 +84,15 @@
<
tr
>
<
tr
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
Status
-
Aceito
ou
Rejeitado
</
td
>
<
td
>
@
if
(
$avaliador
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
true
)
Aceito
@
elseif
(
is_null
(
$avaliador
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
))
Pendente
@
else
Recusado
@
endif
</
td
>
<
td
style
=
"text-align:center"
>
<
td
style
=
"text-align:center"
>
<
form
action
=
"{{ route('admin.remover') }}"
method
=
"POST"
>
<
form
action
=
"{{ route('admin.remover') }}"
method
=
"POST"
>
...
...
resources/views/administrador/selecionarProjetos.blade.php
View file @
02d5a421
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
<
label
for
=
"exampleFormControlSelect2"
>
Example
multiple
select
</
label
>
<
label
for
=
"exampleFormControlSelect2"
>
Example
multiple
select
</
label
>
<
select
name
=
"avaliadores_id[]"
multiple
class
=
"form-control"
id
=
"exampleFormControlSelect2"
>
<
select
name
=
"avaliadores_id[]"
multiple
class
=
"form-control"
id
=
"exampleFormControlSelect2"
>
@
foreach
(
$trabalho
->
aval
as
$avaliador
)
@
foreach
(
$trabalho
->
aval
as
$avaliador
)
<
option
value
=
"{{
$avaliador->id
}}"
>
{{
$avaliador
->
user
->
name
}}
({{
$avaliador
->
area
->
nome
}})
</
option
>
<
option
value
=
"{{
$avaliador->id
}}"
>
{{
$avaliador
->
user
->
name
}}
(
@
if
(
is_null
(
$avaliador
->
area
))
Indefinida
)
@
else
({{
$avaliador
->
area
->
nome
}})
@
endif
</
option
>
@
endforeach
@
endforeach
</
select
>
</
select
>
<
small
id
=
"emailHelp"
class
=
"form-text text-muted"
>
Segure
SHIFT
do
teclado
para
selecionar
mais
de
um
.
</
small
>
<
small
id
=
"emailHelp"
class
=
"form-text text-muted"
>
Segure
SHIFT
do
teclado
para
selecionar
mais
de
um
.
</
small
>
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment