mirror of https://github.com/Fabio286/antares.git
refactor(UI): removed duplicate add filter button
This commit is contained in:
parent
f9ee7d0450
commit
968a67ce3d
|
@ -44,13 +44,6 @@
|
|||
class="form-input ml-2 input-sm"
|
||||
>
|
||||
</div>
|
||||
<button
|
||||
class="btn btn-sm btn-dark mr-0 ml-2"
|
||||
type="button"
|
||||
@click="addRow"
|
||||
>
|
||||
<i class="mdi mdi-plus-circle-outline" />
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-sm btn-dark mr-0 ml-2"
|
||||
type="button"
|
||||
|
@ -66,6 +59,13 @@
|
|||
>
|
||||
{{ $t('word.filter') }}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-sm btn-dark mr-0 ml-2"
|
||||
type="button"
|
||||
@click="addRow"
|
||||
>
|
||||
<i class="mdi mdi-plus-circle-outline" />
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
|
@ -89,13 +89,11 @@ export default {
|
|||
methods: {
|
||||
addRow () {
|
||||
this.rows.push({ active: true, field: this.fields[0].name, op: '=', value: '', value2: '' });
|
||||
this.$emit('filter-change');
|
||||
this.$emit('filter-change', this.rows);
|
||||
},
|
||||
removeRow (i) {
|
||||
if (this.rows.length >= 2) {
|
||||
this.rows = this.rows.filter((_, idx) => idx !== i);
|
||||
this.$emit('filter-change');
|
||||
}
|
||||
this.$emit('filter-change', this.rows);
|
||||
},
|
||||
doFilter () {
|
||||
const clausoles = this.rows.filter(el => el.active).map(el => this.createClausole(el));
|
||||
|
|
Loading…
Reference in New Issue