Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
d8cf7a1f
Commit
d8cf7a1f
authored
2 years ago
by
Yuri Resende
Browse files
Options
Download
Plain Diff
Merge branch 'integrantes_discentes'
parents
04b9d5fc
c2c5a599
master
carl-branch
excluir_projeto_submetido
updates_mar
No related merge requests found
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
app/Http/Controllers/TrabalhoController.php
+6
-5
app/Http/Controllers/TrabalhoController.php
app/Http/Requests/StoreTrabalho.php
+33
-16
app/Http/Requests/StoreTrabalho.php
app/Http/Requests/UpdateTrabalho.php
+12
-8
app/Http/Requests/UpdateTrabalho.php
resources/views/evento/formulario/integrantes.blade.php
+69
-34
resources/views/evento/formulario/integrantes.blade.php
resources/views/evento/formulario/participantes.blade.php
+114
-108
resources/views/evento/formulario/participantes.blade.php
resources/views/evento/submeterTrabalho.blade.php
+10
-4
resources/views/evento/submeterTrabalho.blade.php
resources/views/projeto/editaFormulario/integrantes.blade.php
+114
-22
...urces/views/projeto/editaFormulario/integrantes.blade.php
resources/views/projeto/editaFormulario/participantes.blade.php
+186
-153
...ces/views/projeto/editaFormulario/participantes.blade.php
resources/views/projeto/editar.blade.php
+27
-22
resources/views/projeto/editar.blade.php
with
571 additions
and
372 deletions
+571
-372
app/Http/Controllers/TrabalhoController.php
View file @
d8cf7a1f
...
@@ -1172,9 +1172,9 @@ class TrabalhoController extends Controller
...
@@ -1172,9 +1172,9 @@ class TrabalhoController extends Controller
public
function
buscarUsuario
(
Request
$request
)
{
public
function
buscarUsuario
(
Request
$request
)
{
$usuario
=
User
::
where
(
'cpf'
,
$request
->
cpf_consulta
)
->
first
();
$usuario
=
User
::
where
(
'cpf'
,
$request
->
cpf_consulta
)
->
first
();
$funcao
=
FuncaoParticipantes
::
where
(
'id'
,
$request
->
funcao
)
->
first
();
$funcao
=
FuncaoParticipantes
::
where
(
'id'
,
$request
->
funcao
)
->
first
();
$participante
=
$usuario
->
participantes
()
->
first
();
if
(
$usuario
){
if
(
$usuario
){
$participante
=
$usuario
->
participantes
()
->
first
();
return
json_encode
([
$usuario
,
$funcao
,
$participante
,
$usuario
->
endereco
()
->
first
()]);
return
json_encode
([
$usuario
,
$funcao
,
$participante
,
$usuario
->
endereco
()
->
first
()]);
}
}
...
@@ -1184,6 +1184,7 @@ class TrabalhoController extends Controller
...
@@ -1184,6 +1184,7 @@ class TrabalhoController extends Controller
public
function
salvar
(
StoreTrabalho
$request
)
public
function
salvar
(
StoreTrabalho
$request
)
{
{
// dd($request->all());
try
{
try
{
if
(
!
$request
->
has
(
'rascunho'
))
{
if
(
!
$request
->
has
(
'rascunho'
))
{
$request
->
merge
([
$request
->
merge
([
...
@@ -1219,15 +1220,15 @@ class TrabalhoController extends Controller
...
@@ -1219,15 +1220,15 @@ class TrabalhoController extends Controller
]));
]));
}
}
//adição dos participantes
if
(
$request
->
has
(
'marcado'
))
{
if
(
$request
->
has
(
'marcado'
))
{
foreach
(
$request
->
marcado
as
$key
=>
$part
)
{
foreach
(
$request
->
marcado
as
$key
=>
$part
)
{
$part
=
intval
(
$part
);
$part
=
intval
(
$part
);
$passwordTemporario
=
Str
::
random
(
8
);
//
$passwordTemporario = Str::random(8);
$data
[
'name'
]
=
$request
->
name
[
$part
];
$data
[
'name'
]
=
$request
->
name
[
$part
];
$data
[
'email'
]
=
$request
->
email
[
$part
];
$data
[
'email'
]
=
$request
->
email
[
$part
];
$data
[
'password'
]
=
bcrypt
(
$passwordTemporario
);
//
$data['password'] = bcrypt($passwordTemporario);
$data
[
'data_de_nascimento'
]
=
$request
->
data_de_nascimento
[
$part
];
$data
[
'data_de_nascimento'
]
=
$request
->
data_de_nascimento
[
$part
];
$data
[
'cpf'
]
=
$request
->
cpf
[
$part
];
$data
[
'cpf'
]
=
$request
->
cpf
[
$part
];
$data
[
'tipo'
]
=
'participante'
;
$data
[
'tipo'
]
=
'participante'
;
...
...
This diff is collapsed.
Click to expand it.
app/Http/Requests/StoreTrabalho.php
View file @
d8cf7a1f
...
@@ -26,8 +26,6 @@ class StoreTrabalho extends FormRequest
...
@@ -26,8 +26,6 @@ class StoreTrabalho extends FormRequest
*/
*/
public
function
rules
()
public
function
rules
()
{
{
//dd($this->all());
$evento
=
Evento
::
find
(
$this
->
editalId
);
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
=
[];
$rules
=
[];
...
@@ -51,20 +49,33 @@ class StoreTrabalho extends FormRequest
...
@@ -51,20 +49,33 @@ class StoreTrabalho extends FormRequest
$rules
[
'rg.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'rg.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'data_de_nascimento.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'data_de_nascimento.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'curso.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'curso.'
.
$value
]
=
[
'required'
,
'string'
];
//participantes da pesquisa
if
(
$evento
->
natureza_id
!=
3
){
$rules
[
'turno.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'turno.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'ordem_prioridade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'ordem_prioridade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'periodo_atual.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'periodo_atual.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'total_periodos.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'total_periodos.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$evento
->
tipo
!=
"PIBEX"
)
{
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
}
if
(
$evento
->
tipo
!=
"CONTINUO"
){
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
];
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
}
// if($evento->tipo != "PIBEX") {
// $rules['media_do_curso.' . $value] = ['required', 'string'];
// }
}
}
}
}
}
else
{
}
else
if
(
$evento
->
tipo
!=
"CONTINUO"
){
$rules
[
'anexoPlanoTrabalho'
]
=
[
'required'
];
$rules
[
'anexoPlanoTrabalho'
]
=
[
'required'
];
$rules
[
'nomePlanoTrabalho'
]
=
[
'required'
,
'string'
];
$rules
[
'nomePlanoTrabalho'
]
=
[
'required'
,
'string'
];
}
}
...
@@ -72,10 +83,13 @@ class StoreTrabalho extends FormRequest
...
@@ -72,10 +83,13 @@ class StoreTrabalho extends FormRequest
if
(
$this
->
has
(
'rascunho'
))
{
if
(
$this
->
has
(
'rascunho'
))
{
$rules
=
[];
$rules
=
[];
return
$rules
;
return
$rules
;
}
else
{
}
else
{
//anexos
if
(
$evento
->
nome_docExtra
!=
null
){
if
(
$evento
->
nome_docExtra
!=
null
){
$rules
[
'anexo_docExtra'
]
=
[
Rule
::
requiredIf
(
$evento
->
obrigatoriedade_docExtra
==
true
),
'file'
,
'mimes:zip,doc,docx,pdf'
,
'max:2048'
];
$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"
){
$rules
[
'anexoPlanilhaPontuacao'
]
=
[
'required'
];
$rules
[
'anexoPlanilhaPontuacao'
]
=
[
'required'
];
$rules
[
'anexoLattesCoordenador'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoLattesCoordenador'
]
=
[
'required'
,
'mimes:pdf'
];
...
@@ -91,11 +105,13 @@ class StoreTrabalho extends FormRequest
...
@@ -91,11 +105,13 @@ class StoreTrabalho extends FormRequest
$rules
[
'titulo'
]
=
[
'required'
,
'string'
];
$rules
[
'titulo'
]
=
[
'required'
,
'string'
];
$rules
[
'grande_area_id'
]
=
[
Rule
::
requiredIf
(
$evento
->
natureza_id
!=
3
),
'string'
];
$rules
[
'grande_area_id'
]
=
[
Rule
::
requiredIf
(
$evento
->
natureza_id
!=
3
),
'string'
];
$rules
[
'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
[
'area_tematica_id'
]
=
[
'required'
,
'string'
];
$rules
[
'ods'
]
=
[
'required'
];
$rules
[
'ods'
]
=
[
'required'
];
}
}
$rules
[
'linkLattesEstudante'
]
=
[
'required'
,
'string'
];
$rules
[
'linkLattesEstudante'
]
=
[
'required'
,
'string'
];
...
@@ -107,6 +123,7 @@ class StoreTrabalho extends FormRequest
...
@@ -107,6 +123,7 @@ class StoreTrabalho extends FormRequest
}
}
//dd($rules, $evento);
//dd($rules, $evento);
return
$rules
;
return
$rules
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
app/Http/Requests/UpdateTrabalho.php
View file @
d8cf7a1f
...
@@ -58,15 +58,20 @@ class UpdateTrabalho extends FormRequest
...
@@ -58,15 +58,20 @@ class UpdateTrabalho extends FormRequest
$rules
[
'rg.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'rg.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'data_de_nascimento.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'data_de_nascimento.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'curso.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'curso.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$evento
->
tipo
!=
"PIBEX"
&&
$evento
->
tipo
!=
"CONTINUO"
)
{
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
if
(
$evento
->
tipo
!=
"CONTINUO"
){
$rules
[
'turno.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'turno.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'ordem_prioridade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'ordem_prioridade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'periodo_atual.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'periodo_atual.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'total_periodos.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'total_periodos.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$evento
->
tipo
!=
"PIBEX"
)
{
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
Rule
::
requiredIf
(
$participante
->
planoTrabalho
==
null
)];
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
Rule
::
requiredIf
(
$participante
->
planoTrabalho
==
null
)];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
}
}
}
}
}
...
@@ -113,7 +118,6 @@ class UpdateTrabalho extends FormRequest
...
@@ -113,7 +118,6 @@ class UpdateTrabalho extends FormRequest
$rules
[
'anexoProjeto'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoProjeto
==
null
),
'mimes:pdf'
];
$rules
[
'anexoProjeto'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoProjeto
==
null
),
'mimes:pdf'
];
$rules
[
'anexoDecisaoCONSU'
]
=
[
Rule
::
requiredIf
(
$evento
->
consu
&&
$projeto
->
anexoDecisaoCONSU
==
null
),
'mimes:pdf'
];
$rules
[
'anexoDecisaoCONSU'
]
=
[
Rule
::
requiredIf
(
$evento
->
consu
&&
$projeto
->
anexoDecisaoCONSU
==
null
),
'mimes:pdf'
];
}
}
return
$rules
;
return
$rules
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
resources/views/evento/formulario/integrantes.blade.php
View file @
d8cf7a1f
<div
class=
"col-md-12"
style=
"margin-top: 20px"
>
<div
class=
"col-md-12"
style=
"margin-top: 20px"
>
<div
class=
"card"
style=
"border-radius: 5px"
>
<div
class=
"card"
style=
"border-radius: 5px"
>
<div
class=
"card-body"
style=
"padding-top: 0.2rem;"
>
<div
class=
"card-body"
style=
"padding-top: 0.2rem;"
>
<div
class=
"container"
>
<div
class=
"container"
>
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
</div>
</div>
</div>
</div>
<hr
style=
"border-top: 1px solid#1492E6"
>
<hr
style=
"border-top: 1px solid#1492E6"
>
<div
class=
"row"
id=
"integrante"
>
<!-- <h6 style="color: #234B8B; font-weight: bold;">Integrantes</h6> -->
<div
class=
"row"
id=
"integrante"
style=
"display:none"
>
</div>
</div>
@include('evento.formulario.participantes')
@include('evento.formulario.participantes')
</div>
</div>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<!-- MODAL -->
<!-- MODAL -->
<div
class=
"modal fade"
id=
"modalIntegrante"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modalIntegrante"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-centered modal-
xl
"
>
<div
class=
"modal-dialog modal-dialog-centered modal-
sm
"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Adicionar Integrante
</h5>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Adicionar Integrante
</h5>
...
@@ -36,19 +36,18 @@
...
@@ -36,19 +36,18 @@
<span
aria-hidden=
"true"
>
×
</span>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</button>
</div>
</div>
<div
class=
"container"
>
<div
class=
"row justify-content-center"
style=
"padding-left:35px; padding-right:45px"
>
<div
class=
"form-row d-flex align-items-end"
style=
"padding: 30px;"
>
<div
class=
"form-controll"
style=
"margin-left:10px; margin-top:10px; margin-bottom:15px; font-weight:bold;"
>
<div
class=
"col-md-8"
>
<div
class=
"form-row d-flex"
>
<label
for=
"cpf_consulta"
>
CPF:
</label>
<label
for=
"cpf_consulta"
>
CPF:
</label>
<input
type=
"text"
id=
"cpf_consulta"
name=
"cpf_consulta"
class=
"form-control"
onkeyup=
"mask_cpf();"
>
<input
type=
"text"
id=
"cpf_consulta"
name=
"cpf_consulta"
class=
"form-control"
onkeyup=
"mask_cpf();"
>
</div>
</div>
<div
class=
"col-md-4"
>
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"preencherUsuarioExistente()"
>
Adicionar
</button>
</div>
</div>
<div
class=
"form-row"
style=
"
padding: 0px 30px 30px 3
0px
;
"
>
<div
class=
"form-row
d-flex
"
style=
"
margin-top:1
0px"
>
<label
for=
"funcao_participante"
>
Função do
Particip
ante:
</label>
<label
for=
"funcao_participante"
>
Função do
Integr
ante:
</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')
@if($funcao->nome != 'Bolsista')
...
@@ -59,6 +58,13 @@
...
@@ -59,6 +58,13 @@
@endforeach
@endforeach
</select>
</select>
</div>
</div>
<div
class=
"form-row justify-content-center"
style=
"margin-top:20px;"
>
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"preencherUsuarioExistente()"
>
Adicionar
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -165,6 +171,7 @@
...
@@ -165,6 +171,7 @@
<strong>CPF:</strong>
${
data
[
0
][
'
cpf
'
]}
<strong>CPF:</strong>
${
data
[
0
][
'
cpf
'
]}
<strong>Função:</strong>
${
data
[
1
][
'
nome
'
]}
<strong>Função:</strong>
${
data
[
1
][
'
nome
'
]}
<button type="button" class="btn btn-danger" onclick="removerIntegrante(
${
data
[
0
][
'
id
'
]}
)">Remover</button>
<button type="button" class="btn btn-danger" onclick="removerIntegrante(
${
data
[
0
][
'
id
'
]}
)">Remover</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -184,22 +191,50 @@
...
@@ -184,22 +191,50 @@
function
exibirUsuarioAdicionado
(
data
)
{
function
exibirUsuarioAdicionado
(
data
)
{
$
(
'
#modalIntegrante
'
).
modal
(
'
hide
'
);
$
(
'
#modalIntegrante
'
).
modal
(
'
hide
'
);
document
.
getElementById
(
`nome
${
modal_id
}
`
).
value
=
data
[
0
][
'
name
'
];
document
.
getElementById
(
`nome
${
modal_id
}
`
).
value
=
data
[
0
][
'
name
'
];
document
.
getElementById
(
`nome
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`email
${
modal_id
}
`
).
value
=
data
[
0
][
'
email
'
];
document
.
getElementById
(
`email
${
modal_id
}
`
).
value
=
data
[
0
][
'
email
'
];
document
.
getElementById
(
`email
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
value
=
(
new
Date
(
data
[
2
][
'
data_de_nascimento
'
])).
toLocaleDateString
();
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
value
=
(
new
Date
(
data
[
2
][
'
data_de_nascimento
'
])).
toLocaleDateString
();
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
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
(
`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
(
`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
(
`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
(
`uf
${
modal_id
}
`
).
value
=
data
[
3
][
'
uf
'
];
document
.
getElementById
(
`uf
${
modal_id
}
`
).
value
=
data
[
3
][
'
uf
'
];
document
.
getElementById
(
`uf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
value
=
data
[
3
][
'
cidade
'
];
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
value
=
data
[
3
][
'
cidade
'
];
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
value
=
data
[
3
][
'
bairro
'
];
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
value
=
data
[
3
][
'
bairro
'
];
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`rua
${
modal_id
}
`
).
value
=
data
[
3
][
'
rua
'
];
document
.
getElementById
(
`rua
${
modal_id
}
`
).
value
=
data
[
3
][
'
rua
'
];
document
.
getElementById
(
`rua
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`numero
${
modal_id
}
`
).
value
=
data
[
3
][
'
numero
'
];
document
.
getElementById
(
`numero
${
modal_id
}
`
).
value
=
data
[
3
][
'
numero
'
];
document
.
getElementById
(
`numero
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
value
=
data
[
3
][
'
complemento
'
];
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
value
=
data
[
3
][
'
complemento
'
];
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
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
(
`curso[
${
modal_id
}
]`
).
value
=
data
[
2
][
'
curso
'
];
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
value
=
data
[
2
][
'
curso
'
];
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
$
(
`#exampleModal
${
modal_id
}
`
).
modal
(
'
show
'
);
$
(
`#exampleModal
${
modal_id
}
`
).
modal
(
'
show
'
);
console
.
log
(
data
);
}
}
</script>
</script>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/evento/formulario/participantes.blade.php
View file @
d8cf7a1f
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
</a>
</a>
</div>
</div>
</div> -->
</div> -->
<hr
style=
"border-top: 1px solid#1492E6"
>
<!-- <hr style="border-top: 1px solid#1492E6">
<h6 style="color: #234B8B; font-weight: bold">Participantes</h6> -->
<div
class=
"row-cols-sm-12 justify-content-start"
>
<div
class=
"row-cols-sm-12 justify-content-start"
>
<ol
style=
"counter-reset: item;list-style-type: none; margin-left:-20px; margin-right:20px; margin-top:10px"
>
<ol
style=
"counter-reset: item;list-style-type: none; margin-left:-20px; margin-right:20px; margin-top:10px"
>
<li
id=
"item"
>
<li
id=
"item"
>
...
@@ -39,10 +40,10 @@
...
@@ -39,10 +40,10 @@
@endif
@endif
<h6>
<h6>
<a
id=
"nomePlano{{$i+1}}"
></a><br>
<a
id=
"nomePlano{{$i+1}}"
></a><br>
<a
href=
""
style=
""
class=
"justify-content-center"
data-toggle=
"modal"
data-target=
"#exampleModal{{$i}}"
id=
"nomePart{{$i+1}}"
>
Informações
</a>
<a
href=
""
style=
""
class=
"justify-content-center"
data-toggle=
"modal"
data-target=
"#exampleModal{{$i}}"
id=
"nomePart{{$i+1}}"
>
Mais
Informações
</a>
</h6>
</h6>
<div
class=
"col-sm-5 pl-0"
style=
"margin-top: 10px; text-align: left;"
>
<div
class=
"col-sm-5 pl-0"
style=
"margin-top: 10px; text-align: left;"
>
<button
data-dismiss=
"modal"
type=
"button"
id=
"cancelar{{$i}}"
class=
" btn btn-danger"
style=
"font-size: 12px"
onclick=
"desmarcar({{$i}})"
@
if
(
isset
(
old
('
marcado
')[$
i
+1]))
disabled
@
endif
>
Exclui
r
</button>
<button
data-dismiss=
"modal"
type=
"button"
id=
"cancelar{{$i}}"
class=
" btn btn-danger
btn-sm
"
style=
"font-size: 12px"
onclick=
"desmarcar({{$i}})"
@
if
(
isset
(
old
('
marcado
')[$
i
+1]))
disabled
@
endif
>
Remove
r
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -52,7 +53,7 @@
...
@@ -52,7 +53,7 @@
<div
class=
"modal-dialog modal-dialog-centered modal-xl"
>
<div
class=
"modal-dialog modal-dialog-centered modal-xl"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Dados do
Disce
nte {{$i+1}}
</h5>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Dados do
Integra
nte {{$i+1}}
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</button>
...
@@ -268,6 +269,8 @@
...
@@ -268,6 +269,8 @@
@enderror
@enderror
@endcomponent
@endcomponent
</div>
</div>
@if($edital->natureza_id != 3)
<div
class=
"col-6"
>
<div
class=
"col-6"
>
@component('componentes.select', ['label' => 'Turno'])
@component('componentes.select', ['label' => 'Turno'])
<select
name=
"turno[{{$i}}]"
class=
"form-control"
>
<select
name=
"turno[{{$i}}]"
class=
"form-control"
>
...
@@ -334,7 +337,7 @@
...
@@ -334,7 +337,7 @@
@enderror
@enderror
@endcomponent
@endcomponent
</div>
</div>
@if($edital->tipo != "PIBEX")
<div
class=
"col-6"
>
<div
class=
"col-6"
>
@component('componentes.input', ['label' => 'Coeficiente de rendimento (média geral)'])
@component('componentes.input', ['label' => 'Coeficiente de rendimento (média geral)'])
...
@@ -347,6 +350,8 @@
...
@@ -347,6 +350,8 @@
@endcomponent
@endcomponent
</div>
</div>
@endif
@endif
@if($edital->tipo != "CONTINUO")
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<h5>
Plano de trabalho
</h5>
<h5>
Plano de trabalho
</h5>
</div>
</div>
...
@@ -377,6 +382,7 @@
...
@@ -377,6 +382,7 @@
@enderror
@enderror
@endcomponent
@endcomponent
</div>
</div>
@endif
{{--
<div
class=
"col-6"
>
{{--
<div
class=
"col-6"
>
<button
data-dismiss=
"modal"
type=
"button"
id=
"cancelar{{$i}}"
class=
" btn btn-danger"
style=
"font-size: 16px"
onclick=
"desmarcar({{$i}})"
@
if
(
isset
(
old
('
marcado
')[$
i
+1]))
disabled
@
endif
>
Cancelar
</button>
<button
data-dismiss=
"modal"
type=
"button"
id=
"cancelar{{$i}}"
class=
" btn btn-danger"
style=
"font-size: 16px"
onclick=
"desmarcar({{$i}})"
@
if
(
isset
(
old
('
marcado
')[$
i
+1]))
disabled
@
endif
>
Cancelar
</button>
...
...
This diff is collapsed.
Click to expand it.
resources/views/evento/submeterTrabalho.blade.php
View file @
d8cf7a1f
...
@@ -198,12 +198,17 @@
...
@@ -198,12 +198,17 @@
let
nomePlano
=
document
.
getElementById
(
"nomePlano"
+
(
id
+
1
));
let
nomePlano
=
document
.
getElementById
(
"nomePlano"
+
(
id
+
1
));
let
linkTituloProj
=
document
.
getElementById
(
"tituloProj"
+
(
id
+
1
));
let
linkTituloProj
=
document
.
getElementById
(
"tituloProj"
+
(
id
+
1
));
let
planoTrabalho
=
document
.
getElementById
(
"nomePlanoTrabalho"
+
id
);
let
planoTrabalho
=
document
.
getElementById
(
"nomePlanoTrabalho"
+
id
);
let
cpf
=
document
.
getElementById
(
"cpf"
+
id
);
//let funcao = document.getElementById("funcao_participante");
let
email
=
document
.
getElementById
(
"email"
+
id
);
console
.
log
(
planoTrabalho
);
if
(
nome
.
value
!=
""
){
if
(
nome
.
value
!=
""
){
if
(
planoTrabalho
.
value
!=
""
){
if
(
planoTrabalho
!=
null
&&
planoTrabalho
.
value
!=
""
){
nomePlano
.
innerText
=
`Nome: ${nome.value} \n Plano: ${planoTrabalho.value}`
;
nomePlano
.
innerText
=
`Nome: ${nome.value} \n Plano: ${planoTrabalho.value}
\n E-mail: ${email.value} \n CPF: ${cpf.value}\nFunção:
`
;
}
else
{
}
else
{
nomePlano
.
innerText
=
`Nome: ${nome.value}`
;
nomePlano
.
innerText
=
`Nome: ${nome.value}
\n E-mail: ${email.value} \n CPF: ${cpf.value}\nFunção:
`
;
}
}
}
else
{
}
else
{
nomePlano
.
innerText
=
`Discente `
+
(
id
+
1
);
nomePlano
.
innerText
=
`Discente `
+
(
id
+
1
);
...
@@ -227,7 +232,8 @@
...
@@ -227,7 +232,8 @@
}
}
document
.
getElementById
(
"checkB"
+
id
)
.
checked
=
false
;
document
.
getElementById
(
"checkB"
+
id
)
.
checked
=
false
;
document
.
getElementById
(
"part"
+
id
)
.
setAttribute
(
"hidden"
,
true
);
document
.
getElementById
(
"part"
+
id
)
.
setAttribute
(
"hidden"
,
true
);
$
(
"#atribuir1"
)
.
attr
(
'data-target'
,
'#exampleModal'
+
(
id
));
//$("#atribuir1").attr('data-target','#exampleModal'+(id));
modal_id
-=
1
;
document
.
getElementById
(
"exampleModal"
+
id
)
.
modal
(
'hide'
);
document
.
getElementById
(
"exampleModal"
+
id
)
.
modal
(
'hide'
);
}
}
@
endif
@
endif
...
...
This diff is collapsed.
Click to expand it.
resources/views/projeto/editaFormulario/integrantes.blade.php
View file @
d8cf7a1f
...
@@ -14,15 +14,16 @@
...
@@ -14,15 +14,16 @@
</div>
</div>
</div>
</div>
<hr
style=
"border-top: 1px solid#1492E6"
>
<hr
style=
"border-top: 1px solid#1492E6"
>
<div
class=
"row"
id=
"integrante"
>
<div
class=
"row"
id=
"integrante"
style=
"display:none"
>
</div>
</div>
@include('projeto.editaFormulario.participantes')
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"modalIntegrante"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modalIntegrante"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-centered modal-
xl
"
>
<div
class=
"modal-dialog modal-dialog-centered modal-
sm
"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Adicionar Integrante
</h5>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Adicionar Integrante
</h5>
...
@@ -31,24 +32,38 @@
...
@@ -31,24 +32,38 @@
</button>
</button>
</div>
</div>
<div
class=
"form-row"
style=
"padding: 30px;"
>
<div
class=
"container"
>
<div
class=
"col-md-8"
>
<div
class=
"row justify-content-center"
style=
"padding-left:35px; padding-right:45px"
>
<div
class=
"form-controll"
style=
"margin-left:10px; margin-top:10px; margin-bottom:15px; font-weight:bold;"
>
<div
class=
"form-row d-flex"
>
<label
for=
"cpf_consulta"
>
CPF:
</label>
<label
for=
"cpf_consulta"
>
CPF:
</label>
<input
type=
"text"
id=
"cpf_consulta"
name=
"cpf_consulta"
class=
"form-control"
onkeyup=
"mask_cpf();"
>
<input
type=
"text"
id=
"cpf_consulta"
name=
"cpf_consulta"
class=
"form-control"
onkeyup=
"mask_cpf();"
>
</div>
</div>
<div
class=
"col-md-4 mt-4"
>
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"preencherUsuarioExistente()"
>
Adicionar
</button>
</div>
</div>
<div
class=
"form-row"
style=
"
padding: 0px 30px 30px 3
0px
;
"
>
<div
class=
"form-row
d-flex
"
style=
"
margin-top:1
0px"
>
<label
for=
"funcao_participante"
>
Função do
Particip
ante:
</label>
<label
for=
"funcao_participante"
>
Função do
Integr
ante:
</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')
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
@elseif($edital->tipo != "CONTINUO")
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
@endif
@endforeach
@endforeach
</select>
</select>
</div>
</div>
<div
class=
"form-row justify-content-center"
style=
"margin-top:20px;"
>
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"preencherUsuarioExistente()"
>
Adicionar
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -94,6 +109,26 @@
...
@@ -94,6 +109,26 @@
</div>
</div>
<div
class=
"modal fade"
id=
"aviso-modal-limite-de-integrantes"
data-backdrop=
"static"
tabindex=
"-1"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
style=
"background-color: #dc3545;"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
style=
"color: white;"
>
Aviso
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
>
<span
id=
"texto-erro"
>
O limite de integrantes para esse projeto foi atingido.
</span>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary btn-color-dafault"
data-dismiss=
"modal"
>
Ok
</button>
</div>
</div>
</div>
</div>
<script>
<script>
function
mask_cpf
()
{
function
mask_cpf
()
{
...
@@ -122,6 +157,12 @@
...
@@ -122,6 +157,12 @@
}
}
function
preencherUsuarioExistente
()
{
function
preencherUsuarioExistente
()
{
console
.
log
(
modal_id
);
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
)){
exibirModalNumeroMaximoDeIntegrantes
();
return
;
}
$
.
ajaxSetup
({
$
.
ajaxSetup
({
headers
:
{
headers
:
{
'
X-CSRF-TOKEN
'
:
$
(
'
meta[name="csrf-token"]
'
).
attr
(
'
content
'
)
'
X-CSRF-TOKEN
'
:
$
(
'
meta[name="csrf-token"]
'
).
attr
(
'
content
'
)
...
@@ -139,12 +180,12 @@
...
@@ -139,12 +180,12 @@
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
)
//
console.log(data)
if
(
data
==
'
inexistente
'
||
$
(
'
#cpf_consulta
'
).
val
()
==
""
){
if
(
data
==
'
inexistente
'
||
$
(
'
#cpf_consulta
'
).
val
()
==
""
){
$
(
'
#texto-erro
'
).
html
(
'
CPF não consta no sistema!
'
);
$
(
'
#texto-erro
'
).
html
(
'
CPF não consta no sistema!
'
);
exibirModalUsuarioInexistente
();
exibirModalUsuarioInexistente
();
}
else
{
}
else
{
exibirUsuarioAdicionado
();
exibirUsuarioAdicionado
(
data
);
$
(
'
#integrante
'
).
append
(
`
$
(
'
#integrante
'
).
append
(
`
<div id="integrante
${
data
[
0
][
'
id
'
]}
" class="col-md-6">
<div id="integrante
${
data
[
0
][
'
id
'
]}
" class="col-md-6">
<div class="row">
<div class="row">
...
@@ -171,13 +212,64 @@
...
@@ -171,13 +212,64 @@
$
(
'
#aviso-modal-usuario-nao-existe
'
).
modal
(
'
show
'
);
$
(
'
#aviso-modal-usuario-nao-existe
'
).
modal
(
'
show
'
);
}
}
function
exibirUsuarioAdicionado
()
{
function
exibirModalNumeroMaximoDeIntegrantes
()
{
$
(
'
#aviso-modal-usuario-adicionado
'
).
modal
(
'
show
'
);;
$
(
'
#aviso-modal-limite-de-integrantes
'
).
modal
(
'
show
'
);
}
let
modal_id
=
0
;
function
exibirUsuarioAdicionado
(
data
)
{
// console.log(`${modal_id}`, data);
$
(
'
#modalIntegrante
'
).
modal
(
'
hide
'
);
document
.
getElementById
(
`nome
${
modal_id
}
`
).
value
=
data
[
0
][
'
name
'
];
document
.
getElementById
(
`nome
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`email
${
modal_id
}
`
).
value
=
data
[
0
][
'
email
'
];
document
.
getElementById
(
`email
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
value
=
(
new
Date
(
data
[
2
][
'
data_de_nascimento
'
])).
toLocaleDateString
();
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cpf
${
modal_id
}
`
).
value
=
data
[
0
][
'
cpf
'
];
document
.
getElementById
(
`cpf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`rg
${
modal_id
}
`
).
value
=
data
[
2
][
'
rg
'
];
document
.
getElementById
(
`rg
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`celular
${
modal_id
}
`
).
value
=
data
[
0
][
'
celular
'
];
document
.
getElementById
(
`celular
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cep
${
modal_id
}
`
).
value
=
data
[
3
][
'
cep
'
];
document
.
getElementById
(
`cep
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`uf
${
modal_id
}
`
).
value
=
data
[
3
][
'
uf
'
];
document
.
getElementById
(
`uf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
value
=
data
[
3
][
'
cidade
'
];
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
value
=
data
[
3
][
'
bairro
'
];
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`rua
${
modal_id
}
`
).
value
=
data
[
3
][
'
rua
'
];
document
.
getElementById
(
`rua
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`numero
${
modal_id
}
`
).
value
=
data
[
3
][
'
numero
'
];
document
.
getElementById
(
`numero
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
value
=
data
[
3
][
'
complemento
'
];
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`instituicao[
${
modal_id
}
]`
).
value
=
data
[
0
][
'
instituicao
'
];
document
.
getElementById
(
`instituicao[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
value
=
data
[
2
][
'
curso
'
];
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
$
(
`#exampleModal
${
modal_id
}
`
).
modal
(
'
show
'
);
}
}
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
@
foreach
(
$trabalhos_user
as
$trabalho_user
)
@
foreach
(
$trabalhos_user
as
$trabalho_user
)
if
(
<?php
echo
json_encode
(
$trabalho_user
)
?>
[
'
funcao
'
]){
modal_id
+=
1
;
}
$
(
'
#integrante
'
).
append
(
`
$
(
'
#integrante
'
).
append
(
`
<div id="integrante{{$trabalho_user->id}}" class="col-md-6">
<div id="integrante{{$trabalho_user->id}}" class="col-md-6">
<div class="row">
<div class="row">
...
...
This diff is collapsed.
Click to expand it.
resources/views/projeto/editaFormulario/participantes.blade.php
View file @
d8cf7a1f
<!-- Participantes AKI-->
<!-- Participantes AKI-->
<div
class=
"col-md-12"
<!--
<div class="col-md-12"
style="margin-top: 20px">
style="margin-top: 20px">
<div class="card"
<div class="card"
style="border-radius: 5px">
style="border-radius: 5px">
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</a>
</a>
</div>
</div>
</div>
</div>
<hr
style=
"border-top: 1px solid#1492E6"
>
<hr style="border-top: 1px solid#1492E6">
-->
<div
class=
"row-cols-sm-12 justify-content-start"
>
<div
class=
"row-cols-sm-12 justify-content-start"
>
<ol
<ol
style=
"counter-reset: item;list-style-type: none; margin-left:-20px; margin-right:20px; margin-top:10px"
>
style=
"counter-reset: item;list-style-type: none; margin-left:-20px; margin-right:20px; margin-top:10px"
>
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
if ($projeto->participantes->keys()->contains($i)) {
if ($projeto->participantes->keys()->contains($i)) {
$participante = $projeto->participantes[$i];
$participante = $projeto->participantes[$i];
}
}
@endphp
@endphp
<div
@
if
(!$
participante
)
hidden
@
endif
<div
@
if
(!$
participante
)
hidden
@
endif
...
@@ -59,32 +58,52 @@
...
@@ -59,32 +58,52 @@
@else
@else
Nome: {{ $participante->user->name }}
Nome: {{ $participante->user->name }}
@endif
@endif
<br>
@if($edital->tipo != "CONTINUO")
<br>
@if (isset(old('nomePlanoTrabalho')[$i]))
@if (isset(old('nomePlanoTrabalho')[$i]))
<br>
Plano: {{ old('nomePlanoTrabalho')[$i] }}
Plano: {{ old('nomePlanoTrabalho')[$i] }}
@else
@else
<br>
Plano:
Plano:
{{ $participante->planoTrabalho->titulo ?? 'Não informado' }}
{{ $participante->planoTrabalho->titulo ?? 'Não informado' }}
@endif
@endif
@endif
@if (isset(old('email')[$i]))
E-mail: {{ old('email')[$i] }}
@else
E-mail: {{ $participante->user->email }}
@endif
<br>
@if (isset(old('cpf')[$i]))
CPF:{{ old('cpf')[$i] }}
@else
CPF: {{ $participante->user->cpf }}
@endif
<br>
@if (isset(old('funcao')[$i]))
Função: {{ old('funcao')[$i] }}
@else
@else
Discente
Função: {{ $trabalhos_user[$i]->funcao->nome }}
@endif
@endif
@endif
<h6>
<h6>
<a
href=
""
<a
id=
"nomePart{{ $i + 1 }}"
></a>
style=
""
class=
"justify-content-center"
data-toggle=
"modal"
data-target=
"#exampleModal{{ $i }}"
id=
"nomePart{{ $i + 1 }}"
>
Informações
</a>
</h6>
</h6>
<a
href=
""
style=
""
class=
"justify-content-center"
data-toggle=
"modal"
data-target=
"#exampleModal{{$i}}"
id=
"nomePart{{$i+1}}"
>
Mais Informações
</a>
<div
class=
"col-sm-5 pl-0"
<div
class=
"col-sm-5 pl-0"
style=
"margin-top: 10px; text-align: left;"
>
style=
"margin-top: 10px; text-align: left;"
>
<button
data-dismiss=
"modal"
<button
data-dismiss=
"modal"
type=
"button"
type=
"button"
id=
"cancelar{{ $i }}"
id=
"cancelar{{ $i }}"
class=
" btn btn-danger"
class=
" btn btn-danger
btn-sm
"
style=
"font-size: 12px"
style=
"font-size: 12px"
onclick=
"desmarcar({{ $i }})"
onclick=
"desmarcar({{ $i }})"
>
Excluir
</button>
@
if
(
isset
(
old
('
marcado
')[$
i
+
1]))
disabled
@
endif
>
Excluir
</button>
</div>
</div>
</div>
</div>
...
@@ -96,7 +115,8 @@
...
@@ -96,7 +115,8 @@
tabindex=
"-1"
tabindex=
"-1"
role=
"dialog"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
aria-hidden=
"true"
style=
"overflow:auto;"
>
<div
class=
"modal-dialog modal-dialog-centered modal-xl"
>
<div
class=
"modal-dialog modal-dialog-centered modal-xl"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
...
@@ -181,11 +201,12 @@
...
@@ -181,11 +201,12 @@
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
@component('componentes.input', ['label' => 'Data de nascimento'])
@component('componentes.input', ['label' => 'Data de nascimento'])
<input
type=
"
da
te"
<input
type=
"te
xt
"
class=
"form-control"
class=
"form-control"
value=
"{{ old('data_de_nascimento')[$i] ?? ($participante->data_de_nascimento ?? '') }}"
value=
"{{ old('data_de_nascimento')[$i] ?? ($participante->data_de_nascimento ?? '') }}"
name=
"data_de_nascimento[{{ $i }}]"
name=
"data_de_nascimento[{{ $i }}]"
placeholder=
"Data de nascimento"
/>
placeholder=
"Data de nascimento"
id=
"data_de_nascimento{{$i}}"
/>
@error('data_de_nascimento.' . $i)
@error('data_de_nascimento.' . $i)
<span
class=
"invalid-feedback"
<span
class=
"invalid-feedback"
role=
"alert"
role=
"alert"
...
@@ -201,7 +222,8 @@
...
@@ -201,7 +222,8 @@
class=
"form-control cpf"
class=
"form-control cpf"
value=
"{{ old('cpf')[$i] ?? ($participante->user->cpf ?? '') }}"
value=
"{{ old('cpf')[$i] ?? ($participante->user->cpf ?? '') }}"
name=
"cpf[{{ $i }}]"
name=
"cpf[{{ $i }}]"
placeholder=
"CPF"
/>
placeholder=
"CPF"
id=
"cpf{{$i}}"
/>
@error('cpf.' . $i)
@error('cpf.' . $i)
<span
class=
"invalid-feedback"
<span
class=
"invalid-feedback"
...
@@ -220,7 +242,8 @@
...
@@ -220,7 +242,8 @@
maxlength=
"9"
maxlength=
"9"
value=
"{{ old('rg')[$i] ?? ($participante->rg ?? '') }}"
value=
"{{ old('rg')[$i] ?? ($participante->rg ?? '') }}"
name=
"rg[{{ $i }}]"
name=
"rg[{{ $i }}]"
placeholder=
"RG"
/>
placeholder=
"RG"
id=
"rg{{$i}}"
/>
@error('rg.' . $i)
@error('rg.' . $i)
<span
class=
"invalid-feedback"
<span
class=
"invalid-feedback"
role=
"alert"
role=
"alert"
...
@@ -236,7 +259,8 @@
...
@@ -236,7 +259,8 @@
class=
"form-control celular"
class=
"form-control celular"
value=
"{{ old('celular')[$i] ?? ($participante->user->celular ?? '') }}"
value=
"{{ old('celular')[$i] ?? ($participante->user->celular ?? '') }}"
name=
"celular[{{ $i }}]"
name=
"celular[{{ $i }}]"
placeholder=
"Celular"
/>
placeholder=
"Celular"
id=
"celular{{$i}}"
/>
@error('celular.' . $i)
@error('celular.' . $i)
<span
class=
"invalid-feedback"
<span
class=
"invalid-feedback"
role=
"alert"
role=
"alert"
...
@@ -246,6 +270,7 @@
...
@@ -246,6 +270,7 @@
@enderror
@enderror
@endcomponent
@endcomponent
</div>
</div>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<h5>
Endereço
</h5>
<h5>
Endereço
</h5>
</div>
</div>
...
@@ -332,7 +357,8 @@
...
@@ -332,7 +357,8 @@
<input
name=
"numero[{{ $i }}]"
<input
name=
"numero[{{ $i }}]"
type=
"text"
type=
"text"
class=
"form-control"
class=
"form-control"
value=
"{{ old('numero')[$i] ?? ($participante->user->endereco->numero ?? '') }}"
/>
value=
"{{ old('numero')[$i] ?? ($participante->user->endereco->numero ?? '') }}"
id=
"numero{{$i}}"
/>
@error('numero.' . $i)
@error('numero.' . $i)
<span
class=
"invalid-feedback"
<span
class=
"invalid-feedback"
role=
"alert"
role=
"alert"
...
@@ -373,7 +399,8 @@
...
@@ -373,7 +399,8 @@
<select
style=
"display: inline"
<select
style=
"display: inline"
onchange=
"showInstituicao(this)"
onchange=
"showInstituicao(this)"
class=
"form-control"
class=
"form-control"
name=
"instituicao[{{ $i }}]"
>
name=
"instituicao[{{ $i }}]"
id=
"instituicao[{{$i}}]"
>
<option
value=
""
<option
value=
""
disabled
disabled
selected
selected
...
@@ -421,7 +448,8 @@
...
@@ -421,7 +448,8 @@
<select
style=
"display: inline"
<select
style=
"display: inline"
class=
"form-control"
class=
"form-control"
name=
"curso[{{ $i }}]"
name=
"curso[{{ $i }}]"
onchange=
"showCurso(this)"
>
onchange=
"showCurso(this)"
id=
"curso[{{ $i }}]"
>
<option
value=
""
<option
value=
""
disabled
disabled
selected
selected
...
@@ -490,7 +518,8 @@
...
@@ -490,7 +518,8 @@
@enderror
@enderror
@endcomponent
@endcomponent
</div>
</div>
<div
class=
"col-6"
>
@if($edital->natureza_id != 3)
<div
class=
"col-6"
>
@component('componentes.select', ['label' => 'Turno'])
@component('componentes.select', ['label' => 'Turno'])
<select
name=
"turno[{{ $i }}]"
<select
name=
"turno[{{ $i }}]"
class=
"form-control"
>
class=
"form-control"
>
...
@@ -586,7 +615,6 @@
...
@@ -586,7 +615,6 @@
@enderror
@enderror
@endcomponent
@endcomponent
</div>
</div>
@if ($edital->tipo != 'PIBEX')
<div
class=
"col-6"
>
<div
class=
"col-6"
>
@component('componentes.input', ['label' => 'Coeficiente de rendimento (média geral)'])
@component('componentes.input', ['label' => 'Coeficiente de rendimento (média geral)'])
<input
type=
"number"
<input
type=
"number"
...
@@ -606,6 +634,8 @@
...
@@ -606,6 +634,8 @@
@endcomponent
@endcomponent
</div>
</div>
@endif
@endif
@if($edital->tipo != 'CONTINUO')
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<h5>
Plano de trabalho
</h5>
<h5>
Plano de trabalho
</h5>
</div>
</div>
...
@@ -630,6 +660,8 @@
...
@@ -630,6 +660,8 @@
@enderror
@enderror
@endcomponent
@endcomponent
</div>
</div>
<div
class=
"col-12"
<div
class=
"col-12"
style=
"margin-bottom: 10px"
>
style=
"margin-bottom: 10px"
>
<label>
Anexo (.pdf)
<span
<label>
Anexo (.pdf)
<span
...
@@ -665,6 +697,7 @@
...
@@ -665,6 +697,7 @@
@enderror
@enderror
</div>
</div>
@endif
{{--
<div
class=
"col-6"
>
{{--
<div
class=
"col-6"
>
<button
data-dismiss=
"modal"
type=
"button"
id=
"cancelar{{$i}}"
class=
" btn btn-danger"
style=
"font-size: 16px"
onclick=
"desmarcar({{$i}})"
@
if
(
isset
(
old
('
marcado
')[$
i
+
1]))
disabled
@
endif
>
Excluir
</button>
<button
data-dismiss=
"modal"
type=
"button"
id=
"cancelar{{$i}}"
class=
" btn btn-danger"
style=
"font-size: 16px"
onclick=
"desmarcar({{$i}})"
@
if
(
isset
(
old
('
marcado
')[$
i
+
1]))
disabled
@
endif
>
Excluir
</button>
</div>
--}}
</div>
--}}
...
@@ -704,10 +737,10 @@
...
@@ -704,10 +737,10 @@
</ol>
</ol>
</div>
</div>
<!-- </div>
</div>
</div>
</div>
</div>
</div>
</div> -->
</div>
<script>
<script>
function
limpa_formulário_cep
(
id
)
{
function
limpa_formulário_cep
(
id
)
{
//Limpa valores do formulário de cep.
//Limpa valores do formulário de cep.
...
...
This diff is collapsed.
Click to expand it.
resources/views/projeto/editar.blade.php
View file @
d8cf7a1f
...
@@ -35,10 +35,6 @@
...
@@ -35,10 +35,6 @@
@
include
(
'projeto.editaFormulario.proponente'
)
@
include
(
'projeto.editaFormulario.proponente'
)
@
if
(
$edital
->
numParticipantes
!=
0
)
@
if
(
$edital
->
numParticipantes
!=
0
)
@
include
(
'projeto.editaFormulario.participantes'
)
@
endif
@
if
(
$edital
->
natureza_id
==
3
)
@
include
(
'projeto.editaFormulario.integrantes'
)
@
include
(
'projeto.editaFormulario.integrantes'
)
@
endif
@
endif
...
@@ -50,13 +46,13 @@
...
@@ -50,13 +46,13 @@
</
div
>
</
div
>
</
div
>
</
div
>
</
form
>
</
form
>
@
if
(
$edital
->
numParticipantes
!=
0
)
<!--
@
if
(
$edital
->
numParticipantes
!=
0
)
<
div
id
=
"participanteFirst"
>
<
div
id
=
"participanteFirst"
>
@
component
(
'componentes.participante'
,
[
'enum_turno'
=>
$enum_turno
,
'estados'
=>
$estados
,
])
@
component
(
'componentes.participante'
,
[
'enum_turno'
=>
$enum_turno
,
'estados'
=>
$estados
,
])
@
endcomponent
@
endcomponent
</
div
>
</
div
>
@
endif
@
endif
-->
<!--
Modal
de
Aviso
Edit
-->
<!--
Modal
de
Aviso
Edit
-->
<
div
class
=
"modal fade"
id
=
"exampleModalAnexarDocumento"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel2"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal fade"
id
=
"exampleModalAnexarDocumento"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel2"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered"
role
=
"document"
>
<
div
class
=
"modal-dialog modal-dialog-centered"
role
=
"document"
>
...
@@ -233,33 +229,42 @@
...
@@ -233,33 +229,42 @@
let
linkNome
=
document
.
getElementById
(
"nomePart"
+
(
id
+
1
));
let
linkNome
=
document
.
getElementById
(
"nomePart"
+
(
id
+
1
));
let
linkTituloProj
=
document
.
getElementById
(
"tituloProj"
+
(
id
+
1
));
let
linkTituloProj
=
document
.
getElementById
(
"tituloProj"
+
(
id
+
1
));
let
planoTrabalho
=
document
.
getElementById
(
"nomePlanoTrabalho"
+
id
);
let
planoTrabalho
=
document
.
getElementById
(
"nomePlanoTrabalho"
+
id
);
let
cpf
=
document
.
getElementById
(
"cpf"
+
id
);
let
funcao
=
document
.
getElementById
(
"funcao_participante"
);
let
email
=
document
.
getElementById
(
"email"
+
id
);
let
funcaoParticipantes
=
<?
php
echo
json_encode
(
$funcaoParticipantes
);
?>
;
if(nome.value != ""){
if(nome.value != ""){
if
(
planoTrabalho
.
value
!=
""
){
if(planoTrabalho
!= null
&&
planoTrabalho
.value != ""){
linkNome
.
innerText
=
`Nome: ${nome.value} \n Plano: ${planoTrabalho.value}`
;
linkNome.innerText = `Nome: ${nome.value} \n Plano: ${planoTrabalho.value}
\n E-mail: ${email.value} \n CPF: ${cpf.value}\nFunção: ${funcaoParticipantes[funcao.value -1].nome}
`;
}else {
}else {
linkNome
.
innerText
=
`Nome: ${nome.value}`
;
linkNome.innerText = `Nome: ${nome.value} \n E-mail: ${email.value} \n CPF: ${cpf.value}\nFunção: ${funcaoParticipantes[funcao.value -1].nome}`;
}
}
}
if
(
id
>=
1
){
document
.
getElementById
(
"cancelar"
+
(
id
-
1
))
.
setAttribute
(
"disabled"
,
true
);
}
}
// if(id >=1){
// document.getElementById("cancelar"+(id-1)).setAttribute("disabled", true);
// }
// console.log(document.getElementById("exampleModal"+id));
document.getElementById("checkB"+id).checked = true;
document.getElementById("checkB"+id).checked = true;
$
(
"#atribuir1"
)
.
attr
(
'data-target'
,
'#exampleModal'
+
(
id
+
1
));
// $("#atribuir1").attr('data-target','#exampleModal'+(id+1));
modal_id += 1;
document.getElementById("part"+id).removeAttribute("hidden");
document.getElementById("part"+id).removeAttribute("hidden");
document
.
getElementById
(
"exampleModal"
+
id
)
.
modal
(
'hide'
);
//
document.getElementById("exampleModal"+id).modal('hide');
}
}
function desmarcar(id){
function desmarcar(id){
if
(
id
>=
1
){
;
//
if(id >= 1){
document
.
getElementById
(
"cancelar"
+
(
id
-
1
))
.
removeAttribute
(
"disabled"
);
//
document.getElementById("cancelar"+(id-1)).removeAttribute("disabled");
}
//
}
document.getElementById("checkB"+id).checked = false;
document.getElementById("checkB"+id).checked = false;
document.getElementById("part"+id).setAttribute("hidden",true);
document.getElementById("part"+id).setAttribute("hidden",true);
$
(
"#atribuir1"
)
.
attr
(
'data-target'
,
'#exampleModal'
+
(
id
));
// $("#atribuir1").attr('data-target','#exampleModal'+(id));
document
.
getElementById
(
"exampleModal"
+
id
)
.
modal
(
'hide'
);
// document.getElementById("exampleModal"+id).modal('hide');
modal_id -= 1;
console.log(modal_id);
}
}
@endif
@endif
</script>
</script>
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help