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
d6e8f1f8
"vscode:/vscode.git/clone" did not exist on "7e32453ead451912b7ac3cbb4cb136ef52cd67c4"
Unverified
Commit
d6e8f1f8
authored
May 15, 2023
by
Antônio Durval
Committed by
GitHub
May 15, 2023
Browse files
Merge pull request #855 from antonioDurval/master
Correções da semana
parents
f77004c2
3c3b3c43
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Evento.php
View file @
d6e8f1f8
...
@@ -130,7 +130,7 @@ class Evento extends Model
...
@@ -130,7 +130,7 @@ class Evento extends Model
'tipoAvaliacao'
=>
[
'required'
],
'tipoAvaliacao'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after_or_equal:inicioSubmissao'
],
'pdfEdital'
=>
[
(
'pdfEditalPreenchido'
!==
'sim'
?
'required'
:
''
)
,
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfEdital'
=>
[
'sometimes'
,
'required'
,
'file'
,
'mimes:pdf'
,
'max:2048'
],
];
];
public
function
endereco
(){
public
function
endereco
(){
...
...
app/Http/Controllers/TrabalhoController.php
View file @
d6e8f1f8
...
@@ -1295,16 +1295,20 @@ class TrabalhoController extends Controller
...
@@ -1295,16 +1295,20 @@ class TrabalhoController extends Controller
$data
[
'curso'
]
=
$request
->
outrocurso
[
$part
];
$data
[
'curso'
]
=
$request
->
outrocurso
[
$part
];
}
}
if
(
$evento
->
tipo
!=
"PIBEX"
)
{
if
(
$evento
->
tipo
!=
"CONTINUO"
){
$data
[
'media_do_curso'
]
=
$request
->
media_do_curso
[
$part
];
if
(
$evento
->
tipo
!=
"PIBEX"
)
{
$data
[
'media_do_curso'
]
=
$request
->
media_do_curso
[
$part
];
}
$data
[
'nomePlanoTrabalho'
]
=
$request
->
nomePlanoTrabalho
[
$part
];
}
}
$data
[
'nomePlanoTrabalho'
]
=
$request
->
nomePlanoTrabalho
[
$part
];
}
}
//função no projeto
//função no projeto
if
(
FuncaoParticipantes
::
where
(
'nome'
,
$request
->
funcaoParticipante
[
$part
])
->
exists
())
if
(
$evento
->
tipo
!=
"CONTINUO"
){
$data
[
'funcao_participante_id'
]
=
FuncaoParticipantes
::
where
(
'nome'
,
$request
->
funcaoParticipante
[
$part
])
->
first
()
->
id
;
if
(
FuncaoParticipantes
::
where
(
'nome'
,
$request
->
funcaoParticipante
[
$part
])
->
exists
())
$data
[
'funcao_participante_id'
]
=
FuncaoParticipantes
::
where
(
'nome'
,
$request
->
funcaoParticipante
[
$part
])
->
first
()
->
id
;
}
//instituição do participante
//instituição do participante
if
(
$request
->
instituicao
[
$part
]
!=
"Outra"
)
{
if
(
$request
->
instituicao
[
$part
]
!=
"Outra"
)
{
...
@@ -1332,20 +1336,22 @@ class TrabalhoController extends Controller
...
@@ -1332,20 +1336,22 @@ class TrabalhoController extends Controller
$participante
->
trabalho_id
=
$trabalho
->
id
;
$participante
->
trabalho_id
=
$trabalho
->
id
;
$participante
->
save
();
$participante
->
save
();
if
(
$request
->
estudante
[
$part
]
==
true
&&
$request
[
'nomePlanoTrabalho'
][
$part
]
!=
null
)
{
if
(
$evento
->
tipo
!=
"CONTINUO"
){
$path
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
.
'/'
;
if
(
$request
->
estudante
[
$part
]
==
true
&&
$request
[
'nomePlanoTrabalho'
][
$part
]
!=
null
)
{
$nome
=
$request
[
'nomePlanoTrabalho'
][
$part
]
.
".pdf"
;
$path
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
.
'/'
;
$file
=
$request
->
anexoPlanoTrabalho
[
$part
];
$nome
=
$request
[
'nomePlanoTrabalho'
][
$part
]
.
".pdf"
;
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$file
=
$request
->
anexoPlanoTrabalho
[
$part
];
$arquivo
=
new
Arquivo
();
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
->
titulo
=
$request
[
'nomePlanoTrabalho'
][
$part
];
$arquivo
=
new
Arquivo
();
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
titulo
=
$request
[
'nomePlanoTrabalho'
][
$part
];
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
data
=
now
();
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
participanteId
=
$participante
->
id
;
$arquivo
->
data
=
now
();
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
participanteId
=
$participante
->
id
;
$arquivo
->
save
();
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
}
}
}
}
}
...
...
resources/views/evento/formulario/integrantes.blade.php
View file @
d6e8f1f8
...
@@ -52,30 +52,21 @@
...
@@ -52,30 +52,21 @@
<label
for=
"funcao_participante"
>
Função do Integrante:
</label>
<label
for=
"funcao_participante"
>
Função do Integrante:
</label>
<select
name=
""
id=
"funcao_participante"
class=
"form-control"
>
<select
name=
""
id=
"funcao_participante"
class=
"form-control"
>
@foreach($funcaoParticipantes as $funcao)
@foreach($funcaoParticipantes as $funcao)
@if($funcao->nome == 'Bolsista')
<!-- EXTENSÃO -->
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
@if($edital->natureza_id == 3
&&
$edital->tipo == "CONTINUO")
@endif
@if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador")
<!--
Ajuste temporário para permitir apenas bolsistas
@if($edital->natureza_id == 3)
@if($edital->tipo == "CONTINUO" && $funcao->nome != 'Bolsista')
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
@endif
@elseif($edital->natureza_id == 3
&&
$edital->tipo == "PIBEX")
@if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador" || $funcao->nome == "Bolsista")
@elseif($funcao->nome != "Consultor" && $funcao->nome != "Pesquisador" && $funcao->nome != "Voluntário")
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
@endif
@endif
<!-- PESQUISA -->
@else
@else
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@if($funcao->nome == "Bolsista" || $funcao->nome == "Voluntário")
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
@endif
@endif
@endif
-->
@endforeach
@endforeach
</select>
</select>
</div>
</div>
...
@@ -232,75 +223,53 @@
...
@@ -232,75 +223,53 @@
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
}
//if (data?.[3]?.cpf) {
document
.
getElementById
(
`cpf
${
modal_id
}
`
).
value
=
data
[
0
][
'
cpf
'
];
document
.
getElementById
(
`cpf
${
modal_id
}
`
).
value
=
data
[
0
][
'
cpf
'
];
document
.
getElementById
(
`cpf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cpf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//}
if
(
data
?.[
2
]?.
rg
)
{
//if (data?.[3]?.rg) {
document
.
getElementById
(
`rg
${
modal_id
}
`
).
value
=
data
[
2
][
'
rg
'
];
document
.
getElementById
(
`rg
${
modal_id
}
`
).
value
=
data
[
2
][
'
rg
'
];
document
.
getElementById
(
`rg
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`rg
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
//}
if
(
data
?.[
0
]?.
celular
)
{
//if (data?.[3]?.celular) {
document
.
getElementById
(
`celular
${
modal_id
}
`
).
value
=
data
[
0
][
'
celular
'
];
document
.
getElementById
(
`celular
${
modal_id
}
`
).
value
=
data
[
0
][
'
celular
'
];
document
.
getElementById
(
`celular
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`celular
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
//}
if
(
data
[
3
]
!=
null
)
{
//if (data?.[3]?.cep) {
document
.
getElementById
(
`cep
${
modal_id
}
`
).
value
=
data
[
3
].
cep
;
document
.
getElementById
(
`cep
${
modal_id
}
`
).
value
=
data
[
3
].
cep
;
document
.
getElementById
(
`cep
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cep
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//}
document
.
getElementById
(
`uf
${
modal_id
}
`
).
value
=
data
[
3
].
uf
;
document
.
getElementById
(
`uf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//if (data?.[3]?.cep) {
document
.
getElementById
(
`cep
${
modal_id
}
`
).
value
=
data
[
3
].
cep
;
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
value
=
data
[
3
].
cidade
;
document
.
getElementById
(
`cep
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//}
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
value
=
data
[
3
].
bairro
;
//if (data?.[3]?.uf) {
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`uf
${
modal_id
}
`
).
value
=
data
[
3
].
uf
;
document
.
getElementById
(
`uf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`rua
${
modal_id
}
`
).
value
=
data
[
3
].
rua
;
//}
document
.
getElementById
(
`rua
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//if (data?.[3]?.cidade) {
document
.
getElementById
(
`numero
${
modal_id
}
`
).
value
=
data
[
3
].
numero
;
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
value
=
data
[
3
].
cidade
;
document
.
getElementById
(
`numero
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//}
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
value
=
data
[
3
].
complemento
;
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//if (data?.[3]?.bairro) {
}
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
value
=
data
[
3
].
bairro
;
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//}
//if (data?.[3]?.rua) {
document
.
getElementById
(
`rua
${
modal_id
}
`
).
value
=
data
[
3
].
rua
;
document
.
getElementById
(
`rua
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//}
//if (data?.[3]?.numero) {
document
.
getElementById
(
`numero
${
modal_id
}
`
).
value
=
data
[
3
].
numero
;
document
.
getElementById
(
`numero
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//}
//if (data?.[3]?.complemento) {
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
value
=
data
[
3
].
complemento
;
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
//}
//if (data?.[0]?.instituicao) {
document
.
getElementById
(
`instituicao[
${
modal_id
}
]`
).
value
=
data
[
0
].
instituicao
;
document
.
getElementById
(
`instituicao[
${
modal_id
}
]`
).
value
=
data
[
0
].
instituicao
;
document
.
getElementById
(
`instituicao[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`instituicao[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
//
//if (data?.[2]?.curso) {
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
value
=
data
[
2
].
curso
;
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
value
=
data
[
2
].
curso
;
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
//}
console
.
log
(
document
.
getElementById
(
`funcaoParticipante
${
modal_id
}
`
));
console
.
log
(
document
.
getElementById
(
`funcaoParticipante
${
modal_id
}
`
));
document
.
getElementById
(
`funcaoParticipante
${
modal_id
}
`
).
value
=
data
[
1
][
'
nome
'
];
document
.
getElementById
(
`funcaoParticipante
${
modal_id
}
`
).
value
=
data
[
1
][
'
nome
'
];
if
(
data
[
1
].
nome
!=
"
Bolsista
"
&&
data
[
1
].
nome
!=
"
Voluntário
"
)
{
if
(
data
[
1
].
nome
!=
"
Bolsista
"
&&
data
[
1
].
nome
!=
"
Voluntário
"
)
{
console
.
log
(
document
.
getElementById
(
`plano-titulo
${
modal_id
}
`
));
document
.
getElementById
(
`plano-titulo
${
modal_id
}
`
).
setAttribute
(
'
hidden
'
,
""
);
document
.
getElementById
(
`plano-titulo
${
modal_id
}
`
).
setAttribute
(
'
hidden
'
,
""
);
document
.
getElementById
(
`plano-nome
${
modal_id
}
`
).
setAttribute
(
'
hidden
'
,
""
);
document
.
getElementById
(
`plano-nome
${
modal_id
}
`
).
setAttribute
(
'
hidden
'
,
""
);
document
.
getElementById
(
`plano-anexo
${
modal_id
}
`
).
setAttribute
(
'
hidden
'
,
""
);
document
.
getElementById
(
`plano-anexo
${
modal_id
}
`
).
setAttribute
(
'
hidden
'
,
""
);
...
...
resources/views/evento/formulario/participantes.blade.php
View file @
d6e8f1f8
...
@@ -360,7 +360,7 @@
...
@@ -360,7 +360,7 @@
@endif
@endif
<div
style=
"display: block"
@
if
(
old
('
funcaoParticipante
'
) =
=
null
||
!
array_key_exists
($
i
,
old
('
funcaoParticipante
'))
||
old
('
funcaoParticipante
')[$
i] =
=
'
Bolsista
')
@
else
hidden
@
endif
>
<div
style=
"display: block"
@
if
(
old
('
funcaoParticipante
'
) =
=
null
||
!
array_key_exists
($
i
,
old
('
funcaoParticipante
'))
||
old
('
funcaoParticipante
')[$
i] =
=
'
Bolsista
')
@
else
hidden
@
endif
>
@if($edital->tipo != "CONTINUO")
<div
class=
"col-md-12"
id=
"plano-titulo{{$i}}"
>
<div
class=
"col-md-12"
id=
"plano-titulo{{$i}}"
>
<h5>
Plano de trabalho
</h5>
<h5>
Plano de trabalho
</h5>
</div>
</div>
...
@@ -391,7 +391,7 @@
...
@@ -391,7 +391,7 @@
@enderror
@enderror
@endcomponent
@endcomponent
</div>
</div>
@endif
</div>
</div>
{{--
<div
class=
"col-6"
>
{{--
<div
class=
"col-6"
>
...
...
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