"app/Http/git@sites.upe.br:walter.felipe/submeta.git" did not exist on "7b89bd300c4807bdd3c3f8688ea3c991e8e3def6"
Unverified Commit af6a43df authored by José Fernando Mendes da Costa's avatar José Fernando Mendes da Costa Committed by GitHub
Browse files

Merge pull request #784 from jofernando/master

Corrige texto repetido e motra curso do participante no modal do integrante na tela de submeter projeto
parents 23fda7b6 becabd1a
......@@ -141,6 +141,7 @@ 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) {
......
......@@ -56,6 +56,7 @@ use Illuminate\Support\Facades\Notification;
use App\Desligamento;
use App\ObjetivoDeDesenvolvimentoSustentavel;
use App\AvaliacaoRelatorio;
use App\Curso;
class TrabalhoController extends Controller
{
......@@ -1172,10 +1173,11 @@ 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()]);
return json_encode([$usuario, $funcao, $participante, $usuario->endereco()->first(), $cursos]);
}
return json_encode('inexistente');
......
......@@ -265,7 +265,8 @@
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[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", "");
console.log(document.getElementById(`funcaoParticipante${modal_id}`));
......
......@@ -91,8 +91,8 @@
<div class="row col-md-12">
<div class="form-group col-md-12">
<label for="ods_id" class="col-form-label" style="font-weight: bold">{{ __('Objetivo de Desenvolvimento Sustentável') }} <span style="color: red; font-weight:bold">*</span></label>
<span>Objetivo(s) de Desenvolvimento Sustentável:* (é possível selecionar um ou mais objetivos. Para outras informações, acesse o ,
<a href="https://brasil.un.org/pt-br/sdgs" rel='external' target='_blank'>link).</a></span><br><br>
<span>(é possível selecionar um ou mais objetivos. Para outras informações, acesse o
<a href="https://brasil.un.org/pt-br/sdgs" rel='external' target='_blank'>link</a>).</span><br><br>
<div class="row col-md-12">
@foreach($ods as $od)
<div class="col-md-6">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment