Commit 9ed13ca2 authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Adicionado os planos de trabalho do participante no card de 'Anexos do projeto'

parent 4365ff9e
......@@ -114,6 +114,23 @@
@enderror
</div>
</div>
@for($i = 0; $i < $edital->numParticipantes; $i++)
<div class="form-group col-md-6" hidden id="arquivoPlano{{$i}}">
<label id="labelAnexoPlanoTrabalho{{$i}}" for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold">Plano: </label>
<input type="file" class="input-group-text" value="{{old('anexoPlanoTrabalho')[$i] ?? "" }}" name="anexoPlanoTrabalho[{{$i}}]" id="anexoPlanoTrabalho[{{$i}}]" accept=".pdf" placeholder="Anexo do Plano de Trabalho" />
@error('anexoPlanoTrabalho.'.$i)
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@error('anexoPlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
<br>
</div>
@endfor
@endif
</div>
</div>
......
......@@ -346,22 +346,7 @@
@enderror
@endcomponent
</div>
<div class="col-12">
@component('componentes.input', ['label' => 'Anexo (.pdf)'])
<input type="file" class="input-group-text" value="{{old('anexoPlanoTrabalho')[$i] ?? "" }}" name="anexoPlanoTrabalho[{{$i}}]" accept=".pdf" placeholder="Anexo do Plano de Trabalho" />
@error('anexoPlanoTrabalho.'.$i)
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@error('anexoPlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
<br>
</div>
<div class="col-6">
<button data-dismiss="modal" type="button" id="cancelar{{$i}}" class=" btn btn-danger" style="font-size: 16px" onclick="desmarcar({{$i}})">Cancelar</button>
</div>
......@@ -395,37 +380,7 @@
</div>
</div>
<script>
$("input.rg:text").mask('00.000.000-0');
function marcar(id){
let nome = document.getElementById("nome"+id);
let linkNome = document.getElementById("nomePart"+(id+1));
let linkTituloProj = document.getElementById("tituloProj"+(id+1));
let planoTrabalho = document.getElementById("nomePlanoTrabalho"+id);
if(nome.value != ""){
if(planoTrabalho.value != ""){
linkNome.innerText = `Nome: ${nome.value} \n Título do Plano: ${planoTrabalho.value}`;
}else {
linkNome.innerText = `Nome: ${nome.value}`;
}
}
document.getElementById("checkB"+id).checked = true;
$("#atribuir1").attr('data-target','#exampleModal'+(id+1));
document.getElementById("part"+id).removeAttribute("hidden");
document.getElementById("exampleModal"+id).modal('hide');
}
function desmarcar(id){
document.getElementById("checkB"+id).checked = false;
document.getElementById("part"+id).setAttribute("hidden",true);
$("#atribuir1").attr('data-target','#exampleModal'+(id));
document.getElementById("exampleModal"+id).modal('hide');
}
</script>
<!--X Participantes X-->
......@@ -185,7 +185,39 @@
});
$("input.rg:text").mask('00.000.000-0');
function marcar(id){
let nome = document.getElementById("nome"+id);
let linkNome = document.getElementById("nomePart"+(id+1));
let linkTituloProj = document.getElementById("tituloProj"+(id+1));
let planoTrabalho = document.getElementById("nomePlanoTrabalho"+id);
if(nome.value != ""){
if(planoTrabalho.value != ""){
linkNome.innerText = `Nome: ${nome.value} \n Título do Plano: ${planoTrabalho.value}`;
}else {
linkNome.innerText = `Nome: ${nome.value}`;
}
}
document.getElementById("labelAnexoPlanoTrabalho"+id).innerHTML += document.getElementById("nomePlanoTrabalho"+id).value + `<span style="color: red"> *</span>`;
document.getElementById("arquivoPlano"+id).removeAttribute("hidden");
document.getElementById("checkB"+id).checked = true;
$("#atribuir1").attr('data-target','#exampleModal'+(id+1));
document.getElementById("part"+id).removeAttribute("hidden");
document.getElementById("exampleModal"+id).modal('hide');
}
function desmarcar(id){
document.getElementById("arquivoPlano"+id).setAttribute("hidden", true);
document.getElementById("checkB"+id).checked = false;
document.getElementById("part"+id).setAttribute("hidden",true);
$("#atribuir1").attr('data-target','#exampleModal'+(id));
document.getElementById("exampleModal"+id).modal('hide');
}
</script>
......
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