Commit d9217876 authored by unknown's avatar unknown
Browse files

Adição de campo de busca na parte dos avalaiadores de relatorio

parent fac7234a
...@@ -624,6 +624,9 @@ ...@@ -624,6 +624,9 @@
para a(s) avaliacões de relatorio final</label> para a(s) avaliacões de relatorio final</label>
@endif @endif
</div> </div>
<div class="col-md-5" style="display:flex; align-items: end; max-width: 200px;">
<input type="text" class="form-control form-control-edit" placeholder="Nome do avaliador" onkeyup="buscarAvalRelatorio(this)"> <img src="{{asset('img/icons/logo_lupa.png')}}" alt="">
</div>
</div> </div>
@foreach($trabalho->participantes as $participante) @foreach($trabalho->participantes as $participante)
<div class="col-md-6"> <div class="col-md-6">
...@@ -1970,12 +1973,13 @@ ...@@ -1970,12 +1973,13 @@
<script> <script>
//let seletor = document.getElementsByClassName('aval1') //let seletor = document.getElementsByClassName('aval1')
//console.log(seletor[0].children[0].text) //console.log(seletor[0].children[0].text)=
function buscar(input) { function buscar(input) {
let seletor1 = document.getElementById('exampleFormControlSelect2').children; let seletor1 = document.getElementById('exampleFormControlSelect2').children;
let seletor2 = document.getElementById('exampleFormControlSelect3').children; let seletor2 = document.getElementById('exampleFormControlSelect3').children;
for(let i = 0; i < seletor1.length; i++){ for(let i = 0; i < seletor1.length; i++){
let nomeAval1 = seletor1[i].textContent let nomeAval1 = seletor1[i].textContent
...@@ -2001,5 +2005,24 @@ ...@@ -2001,5 +2005,24 @@
} }
} }
function buscarAvalRelatorio(input) {
let seletorAvalRelatorio = document.querySelectorAll('#avaliacaoSelect');
for(let i = 0; i < seletorAvalRelatorio.length; i++){
for(let j = 0; j < seletorAvalRelatorio[i].children.length; j++){
let nomeAval = seletorAvalRelatorio[i].children[j].textContent
if(nomeAval.toLowerCase().substr(0).indexOf(input.value.toLowerCase()) >= 0){
seletorAvalRelatorio[i].children[j].style.display = "";
}else {
seletorAvalRelatorio[i].children[j].style.display = "none";
}
}
}
}
</script> </script>
@endsection @endsection
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