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
becabd1a
"vscode:/vscode.git/clone" did not exist on "e845ab5140cb9d272ae1b2018ff80a1130823570"
Commit
becabd1a
authored
May 09, 2023
by
José Fernando Mendes da Costa
Browse files
mostra o curso do participante pela relação participanteXcurso
parent
07f3b486
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
becabd1a
...
@@ -56,6 +56,7 @@ use Illuminate\Support\Facades\Notification;
...
@@ -56,6 +56,7 @@ use Illuminate\Support\Facades\Notification;
use
App\Desligamento
;
use
App\Desligamento
;
use
App\ObjetivoDeDesenvolvimentoSustentavel
;
use
App\ObjetivoDeDesenvolvimentoSustentavel
;
use
App\AvaliacaoRelatorio
;
use
App\AvaliacaoRelatorio
;
use
App\Curso
;
class
TrabalhoController
extends
Controller
class
TrabalhoController
extends
Controller
{
{
...
@@ -1172,10 +1173,11 @@ class TrabalhoController extends Controller
...
@@ -1172,10 +1173,11 @@ 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
();
$cursos
=
Curso
::
pluck
(
'nome'
,
'id'
)
->
all
();
if
(
$usuario
){
if
(
$usuario
){
$participante
=
$usuario
->
participantes
()
->
first
();
$participante
=
$usuario
->
participantes
()
->
first
();
return
json_encode
([
$usuario
,
$funcao
,
$participante
,
$usuario
->
endereco
()
->
first
()]);
return
json_encode
([
$usuario
,
$funcao
,
$participante
,
$usuario
->
endereco
()
->
first
()
,
$cursos
]);
}
}
return
json_encode
(
'inexistente'
);
return
json_encode
(
'inexistente'
);
...
...
resources/views/evento/formulario/integrantes.blade.php
View file @
becabd1a
...
@@ -265,7 +265,8 @@
...
@@ -265,7 +265,8 @@
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
"
,
""
);
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
value
=
data
[
2
][
'
curso
'
];
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
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`curso[
${
modal_id
}
]`
).
setAttribute
(
"
readonly
"
,
""
);
console
.
log
(
document
.
getElementById
(
`funcaoParticipante
${
modal_id
}
`
));
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