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
3481e714
Unverified
Commit
3481e714
authored
May 09, 2023
by
José Fernando Mendes da Costa
Committed by
GitHub
May 09, 2023
Browse files
Merge pull request #788 from jofernando/outrocurso
Corrige condição do usuário informar outro curso
parents
af6a43df
6951d09f
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/Auth/RegisterController.php
View file @
3481e714
...
...
@@ -141,7 +141,6 @@ class RegisterController extends Controller
$endereco
->
save
();
$participante
->
data_de_nascimento
=
$data
[
'data_de_nascimento'
];
$participante
->
curso
=
Curso
::
find
(
$data
[
'cursoEstudante'
]);
$participante
->
linkLattes
=
$data
[
'linkLattes'
];
if
(
$data
[
'outroCursoEstudante'
]
!=
null
)
{
...
...
app/Http/Controllers/TrabalhoController.php
View file @
3481e714
...
...
@@ -1173,11 +1173,12 @@ class TrabalhoController extends Controller
public
function
buscarUsuario
(
Request
$request
)
{
$usuario
=
User
::
where
(
'cpf'
,
$request
->
cpf_consulta
)
->
first
();
$funcao
=
FuncaoParticipantes
::
where
(
'id'
,
$request
->
funcao
)
->
first
();
$cursos
=
Curso
::
pluck
(
'nome'
,
'id'
)
->
all
();
if
(
$usuario
){
$participante
=
$usuario
->
participantes
()
->
first
();
return
json_encode
([
$usuario
,
$funcao
,
$participante
,
$usuario
->
endereco
()
->
first
(),
$cursos
]);
if
(
$participante
->
curso
==
null
&&
$participante
->
curso_id
!=
null
)
$participante
->
curso
=
Curso
::
find
(
$participante
->
curso_id
)
->
nome
;
return
json_encode
([
$usuario
,
$funcao
,
$participante
,
$usuario
->
endereco
()
->
first
()]);
}
return
json_encode
(
'inexistente'
);
...
...
resources/views/evento/formulario/integrantes.blade.php
View file @
3481e714
...
...
@@ -265,8 +265,7 @@
document
.
getElementById
(
`instituicao[
${
modal_id
}
]`
).
value
=
data
[
0
][
'
instituicao
'
];
document
.
getElementById
(
`instituicao[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
value
=
data
[
4
][
data
[
2
][
'
curso_id
'
]];
console
.
log
(
data
[
2
][
'
curso_id
'
],
data
[
4
],
data
[
4
][
data
[
2
][
'
curso_id
'
]]);
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
value
=
data
[
2
][
'
curso
'
];
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
console
.
log
(
document
.
getElementById
(
`funcaoParticipante
${
modal_id
}
`
));
...
...
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