Browse Source

Fix #3130 - Colocando checkbox que filtra parlamentares ativos (#3131)

* Fix #3130 - Colocando checkbox que filtra parlamentares ativos

* Adequando pra filtrar titular

* Transferindo logica para do checkbox JS
pull/3084/merge
Ulysses Lara 5 years ago
committed by GitHub
parent
commit
d182f4c80f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      sapl/templates/parlamentares/parlamentares_list.html

13
sapl/templates/parlamentares/parlamentares_list.html

@ -28,7 +28,6 @@
<input v-model="nome_pesquisa" type="text" class="form-control" aria-label="Pesquisa" aria-describedby="inputGroup-sizing-sm">
</div>
</div>
<!--Lista parlamentares-->
<div v-else>
<fieldset class="form-group">
@ -42,10 +41,16 @@
</form>
</fieldset>
<br/>
<div class="float-right">
<input @change="checkTitularAtivo" class="form-check-input" type="checkbox" id="filter_ativo" v-model="filter_ativo">
<label class="form-check-label" for="filter_ativo">Apenas Ativos</label>
<input @change="checkTitularAtivo" class="form-check-input" type="checkbox" id="filter_titular" v-model="filter_titular">
<label class="form-check-label" for="filter_titular">Apenas Titulares</label>
</div>
</div>
<div class="container-table lista-parlamentares">
<div class="result-count">Total de Parlamentares: <strong>[[parlamentares.length]]</strong></div>
<div class="result-count">Total de Parlamentares: <strong>[[size_parlamentares]]</strong></div>
<table class="table table-striped table-hover table-link-ordering">
<thead>
<tr>
@ -55,8 +60,8 @@
<th v-if="!is_pesquisa" >Titular?</th>
</tr>
</thead>
<tbody>
<tr v-for="parlamentar in parlamentares">
<tbody v-for="parlamentar in visible_parlamentares">
<tr>
<th>
<img class="img-fluid img-thumbnail" style="width: 128px; height: 128px;" v-bind:src="parlamentar.fotografia_cropped" @error="(() => parlamentar.fotografia = '')"/>
</th>

Loading…
Cancel
Save