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
a90fa009
Commit
a90fa009
authored
May 27, 2023
by
luisfrl
Browse files
Merge branch 'master' into feature/case-sensitive-email
parents
2e1284dd
7cc3eed9
Changes
7
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
a90fa009
...
...
@@ -114,7 +114,7 @@ class AdministradorController extends Controller
// $participantes = User::whereIn('id', $participantesUsersIds)->get();
return
view
(
'administrador.analisar'
)
->
with
([
'trabalhos'
=>
$trabalhos
->
paginate
(
20
),
'trabalhos'
=>
$trabalhos
->
paginate
(
9999
),
'evento'
=>
$evento
,
'funcaoParticipantes'
=>
$funcaoParticipantes
,
'column'
=>
$request
->
column
,
...
...
app/Http/Controllers/AvaliacaoRelatorioController.php
View file @
a90fa009
...
...
@@ -188,4 +188,13 @@ class AvaliacaoRelatorioController extends Controller
return
redirect
()
->
back
();
}
public
function
atualizarNota
(
$id
,
Request
$request
){
$aval
=
AvaliacaoRelatorio
::
find
(
$id
);
$aval
->
nota
=
$request
->
nota
;
$aval
->
nota_apresentacao
=
$request
->
nota_apresentacao
;
$aval
->
save
();
return
redirect
()
->
back
()
->
with
([
'sucesso'
=>
"Notas avaliadas por "
.
$aval
->
user
->
name
.
" atualizadas!"
]);
}
}
app/Http/Requests/StoreTrabalho.php
View file @
a90fa009
...
...
@@ -22,7 +22,7 @@ class StoreTrabalho extends FormRequest
protected
function
prepareForValidation
()
{
$func
=
function
(
$value
)
{
$func
=
function
(
$value
)
{
return
[
'cpf'
=>
$value
];
};
$this
->
merge
([
...
...
@@ -38,46 +38,45 @@ class StoreTrabalho extends FormRequest
*/
public
function
rules
()
{
//
dd($this->all());
//dd($this->all());
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
=
[];
if
(
$this
->
has
(
'marcado'
)){
if
(
$this
->
has
(
'marcado'
))
{
$rules
[
'cpfs.*.cpf'
]
=
[
'distinct'
,
'nullable'
];
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
//user
$rules
[
'name.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'email.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'instituicao.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'cpf.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'celular.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$this
->
estudante
[
$value
]
===
true
){
if
(
intval
(
$value
)
==
$key
)
{
//user
$rules
[
'name.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'email.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'instituicao.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'cpf.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'celular.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$this
->
estudante
[
$value
]
==
true
)
{
//endereco
$rules
[
'rua.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'numero.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'bairro.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'cidade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'uf.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'cep.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'rua.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'numero.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'bairro.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'cidade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'uf.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'cep.'
.
$value
]
=
[
'required'
,
'string'
];
//participante
$rules
[
'rg.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'data_de_nascimento.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'curso.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'rg.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'data_de_nascimento.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'curso.'
.
$value
]
=
[
'required'
,
'string'
];
//participantes da pesquisa
if
(
$evento
->
natureza_id
!=
3
){
$rules
[
'turno.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'ordem_prioridade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'periodo_atual.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'total_periodos.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$evento
->
natureza_id
!=
3
)
{
$rules
[
'turno.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'ordem_prioridade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'periodo_atual.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'total_periodos.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
if
(
$evento
->
tipo
!=
"CONTINUO"
&&
(
$this
->
funcaoParticipante
[
$value
]
==
"Voluntário"
||
$this
->
funcaoParticipante
[
$value
]
==
"Bolsista"
)){
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
}
}
...
...
@@ -87,30 +86,29 @@ class StoreTrabalho extends FormRequest
}
}
}
else
if
(
$evento
->
tipo
!=
"CONTINUO"
){
}
else
if
(
$evento
->
tipo
!=
"CONTINUO"
)
{
$rules
[
'anexoPlanoTrabalho'
]
=
[
'required'
];
$rules
[
'nomePlanoTrabalho'
]
=
[
'required'
,
'string'
];
}
if
(
$this
->
has
(
'rascunho'
))
{
if
(
$this
->
has
(
'rascunho'
))
{
$rules
=
[];
return
$rules
;
}
else
{
//anexos
if
(
$evento
->
nome_docExtra
!=
null
){
$rules
[
'anexo_docExtra'
]
=
[
Rule
::
requiredIf
(
$evento
->
obrigatoriedade_docExtra
==
true
),
'file'
,
'mimes:zip,doc,docx,pdf'
,
'max:2048'
];
if
(
$evento
->
nome_docExtra
!=
null
)
{
$rules
[
'anexo_docExtra'
]
=
[
Rule
::
requiredIf
(
$evento
->
obrigatoriedade_docExtra
==
true
),
'file'
,
'mimes:zip,doc,docx,pdf'
,
'max:2048'
];
}
if
(
$evento
->
tipo
!=
"PIBEX"
&&
$evento
->
tipo
!=
"CONTINUO"
){
if
(
$evento
->
tipo
!=
"PIBEX"
&&
$evento
->
tipo
!=
"CONTINUO"
)
{
//dd($this->preenchimentoFormFlag);
$rules
[
'anexoPlanilhaPontuacao'
]
=
[
'required'
];
$rules
[
'anexoLattesCoordenador'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoGrupoPesquisa'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoAutorizacaoComiteEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
autorizacaoFlag
==
'sim'
)];
$rules
[
'justificativaAutorizacaoEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
autorizacaoFlag
==
'nao'
)];
$rules
[
'justificativaAutorizacaoEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
autorizacaoFlag
==
'nao'
)];
$rules
[
'pontuacaoPlanilha'
]
=
[
'required'
,
'string'
];
$rules
[
'linkGrupoPesquisa'
]
=
[
'required'
,
'string'
];
$rules
[
'preenchimentoFormFlag'
]
=
[
Rule
::
in
([
'sim'
]),
'required'
];
...
...
@@ -123,7 +121,7 @@ class StoreTrabalho extends FormRequest
$rules
[
'grande_area_id'
]
=
[
Rule
::
requiredIf
(
$evento
->
natureza_id
!=
3
),
'string'
];
$rules
[
'area_id'
]
=
[
Rule
::
requiredIf
(
$evento
->
natureza_id
!=
3
),
'string'
];
if
(
$evento
->
natureza_id
==
3
){
if
(
$evento
->
natureza_id
==
3
)
{
$rules
[
'area_tematica_id'
]
=
[
'required'
,
'string'
];
$rules
[
'ods'
]
=
[
'required'
];
...
...
@@ -132,7 +130,7 @@ class StoreTrabalho extends FormRequest
$rules
[
'linkLattesEstudante'
]
=
[
'required'
,
'string'
];
if
(
$evento
->
tipo
!=
"CONTINUO"
){
if
(
$evento
->
tipo
!=
"CONTINUO"
)
{
$rules
[
'anexoDecisaoCONSU'
]
=
[
Rule
::
requiredIf
(
$evento
->
consu
),
'mimes:pdf'
];
$rules
[
'anexoProjeto'
]
=
[
'required'
,
'mimes:pdf'
];
}
else
{
...
...
resources/views/avaliacaoRelatorio/avaliacao.blade.php
View file @
a90fa009
...
...
@@ -14,15 +14,16 @@
<
h5
><
b
>
Plano
:</
b
>
{{
$arquivo
->
titulo
}}
</
h5
>
</
div
>
<
form
action
=
"{{route('coordenador.atualizar.avaliacao', ['id' =>
$aval->id
])}}"
method
=
"POST"
>
<
div
class
=
"row"
>
@
csrf
<
div
class
=
"col-sm-1 padEsquerda"
>
<
label
for
=
"lattes"
class
=
"col-form-label font-tam"
style
=
"font-weight: bold"
>
{{
__
(
'Nota: '
)
}}
</
label
>
</
div
>
<
div
class
=
"col-sm-5 text-center padEsquerda"
>
<
input
class
=
"form-control"
name
=
"nota"
type
=
"number"
style
=
"width: 60px"
@
if
(
isset
(
$aval
))
value
=
"
{
{$aval->nota}
}
"
@
endif
disabled
>
style
=
"width: 60px"
@
if
(
isset
(
$aval
))
value
=
"
{
{$aval->nota}
}
"
@
endif
>
</
div
>
<
div
class
=
"col-sm-2 padEsquerda"
>
...
...
@@ -30,8 +31,8 @@
style
=
"font-weight: bold"
>
{{
__
(
'Apresentação: '
)
}}
</
label
>
</
div
>
<
div
class
=
"col-sm-4 text-center padEsquerda"
>
<
input
class
=
"form-control"
name
=
"nota"
type
=
"number"
style
=
"width: 60px"
@
if
(
isset
(
$aval
))
value
=
"
{
{$aval->nota_apresentacao}
}
"
@
endif
disabled
>
<
input
class
=
"form-control"
name
=
"nota
_apresentacao
"
type
=
"number"
style
=
"width: 60px"
@
if
(
isset
(
$aval
))
value
=
"
{
{$aval->nota_apresentacao}
}
"
@
endif
>
</
div
>
</
div
>
<
div
class
=
"row"
>
...
...
@@ -51,6 +52,8 @@
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-10"
>
<
label
for
=
"lattes"
class
=
"col-form-label font-tam"
style
=
"font-weight: bold;margin-right: 5px;"
>
{{
__
(
'Arquivo: '
)
}}
</
label
>
@
if
(
isset
(
$aval
))
...
...
@@ -61,6 +64,16 @@
@
endif
@
endif
</
div
>
<
div
class
=
'col-2'
style
=
'margin-top:1%; padding-left:8%;'
>
<
button
type
=
'submit'
class
=
'btn btn-info btn-sm'
>
Editar
</
button
>
</
div
>
</
form
>
</
div
>
</
div
>
<
style
>
.
padEsquerda
{
...
...
resources/views/evento/submeterTrabalho.blade.php
View file @
a90fa009
...
...
@@ -221,28 +221,13 @@
let email = document.getElementById("email"+id);
let funcaoParticipantes =
<?php
echo
json_encode
(
$funcaoParticipantes
);
?>
;
let nome_funcao = get_funcao(funcao.value);
//pega o nome da função do participante
for (var i = 0; i
<
funcaoParticipantes.length
;
i
++)
{
if(funcaoParticipantes[i].id =
=
funcao.value
){
nome_funcao =
funcaoParticipantes[i].nome;
break
;
}
}
let curso = document.getElementById('curso['+id+']').value;
if(nome.value != ""){
estudante.value = true;
if
(
planoTrabalho
!=
null
&&
planoTrabalho.value
!=
""){
nomePlano.innerHTML =
`
<
strong
>
Nome:
</strong>
${nome.value}
<br>
<strong>
E-mail:
</strong>
${email.value}
<br>
<strong>
Plano:
</strong>
${planoTrabalho.value}
<br>
<strong>
CPF:
</strong>
${cpf.value}
<br>
<strong>
Função:
</strong>
${nome_funcao}`;
}else {
nomePlano.innerHTML = `
<strong>
Nome:
</strong>
${nome.value}
<br>
<strong>
E-mail:
</strong>
${email.value}
<br>
<strong>
CPF:
</strong>
${cpf.value}
<br>
<strong>
Função:
</strong>
${nome_funcao}`;
nomePlano.innerHTML = exibirInformacoesGeraisDoIntegrante(nome.value, email.value, celular.value, curso, nome_funcao);
if (nome_funcao == "Bolsista") {
nomePlano.innerHTML += `
<br><strong>
Plano:
</strong>
${planoTrabalho.value !== null ? planoTrabalho.value : ''}`;
}
}else if(data != null) {
estudante.value = false;
...
...
@@ -252,11 +237,9 @@
instituicao.value = data[0].instituicao;
cpf.value = data[0].cpf;
celular.value = data[0].celular;
nomePlano.innerHTML = `
<strong>
Nome:
</strong>
${nome.value}
<br>
<strong>
E-mail:
</strong>
${email.value}
<br>
<strong>
CPF:
</strong>
${cpf.value}
<br>
<strong>
Função:
</strong>
${data[1].nome}`;
nome_funcao = data[1].nome;
curso = data[2].curso;
nomePlano.innerHTML = exibirInformacoesGeraisDoIntegrante(nome.value, email.value, celular.value, curso, nome_funcao);
}
if(id >=1){
document.getElementById("cancelar"+(id-1)).setAttribute("disabled", true);
...
...
@@ -268,10 +251,16 @@
document.getElementById("quantidadeModais").value = modal_id;
document.getElementById("part"+id).removeAttribute("hidden");
//document.getElementById("exampleModal"+id).modal('hide');
}
function exibirInformacoesGeraisDoIntegrante(nome, email, celular, curso, nomeFuncao) {
return `
<strong>
Nome:
</strong>
${nome}
<br>
<strong>
E-mail:
</strong>
${email}
<br>
<strong>
Telefone:
</strong>
${celular !== null ? celular : ''}
<br>
<strong>
Curso:
</strong>
${curso !== null ? curso : ''}
<br>
<strong>
Função:
</strong>
${nomeFuncao}`;
}
function desmarcar(id){
if(id >= 1){;
document.getElementById("cancelar"+(id-1)).removeAttribute("disabled");
...
...
resources/views/projeto/formularioVisualizar/relatorio.blade.php
View file @
a90fa009
...
...
@@ -72,7 +72,7 @@
</td>
<td>
Parcial
</td>
<td>
@if($aval->nota == null) Pendente @else {{$aval->nota}} @endif
</td>
<td>
@if($aval->nota_apresentacao == null) Pendente @else {{$aval->nota}} @endif
</td>
<td>
@if($aval->nota_apresentacao == null) Pendente @else {{$aval->nota
_apresentacao
}} @endif
</td>
<td><a
href=
""
data-toggle=
"modal"
data-target=
"#modalVizuRelatParcial{{$aval->id}}"
class=
"button"
>
Visualizar
</a></td>
</tr>
...
...
@@ -105,7 +105,7 @@
</td>
<td>
Final
</td>
<td>
@if($aval->nota == null) Pendente @else {{$aval->nota}} @endif
</td>
<td>
@if($aval->nota_apresentacao == null) Pendente @else {{$aval->nota}} @endif
</td>
<td>
@if($aval->nota_apresentacao == null) Pendente @else {{$aval->nota
_apresentacao
}} @endif
</td>
<td><a
href=
""
data-toggle=
"modal"
data-target=
"#modalVizuRelatFinal{{$aval->id}}"
class=
"button"
>
Visualizar
</a></td>
</tr>
<!-- Modal visualizar informações participante -->
...
...
routes/web.php
View file @
a90fa009
...
...
@@ -361,4 +361,6 @@ Route::prefix('coordenador')->name('coordenador.')->group(function () {
Route
::
post
(
'/atribuir'
,
'TrabalhoController@atribuir'
)
->
name
(
'atribuir'
);
Route
::
post
(
'/atribuir'
,
'TrabalhoController@atribuir'
)
->
name
(
'atribuir'
);
Route
::
post
(
'/resposta-solicitacao-desligamento/{desligamento_id}'
,
'CoordenadorComissaoController@respostaDesligamento'
)
->
name
(
'resposta.desligamento'
);
Route
::
post
(
'/analisarProposta/{id}/atualizar'
,
'AvaliacaoRelatorioController@atualizarNota'
)
->
name
(
'atualizar.avaliacao'
);
});
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