Add "between" verb for numeric grid filters

This commit is contained in:
Lance Edgar 2022-11-15 16:29:15 -06:00
parent 3e8924e7cc
commit deed2111fb
3 changed files with 134 additions and 3 deletions

View file

@ -1,5 +1,29 @@
## -*- coding: utf-8; -*-
<script type="text/x-template" id="grid-filter-numeric-value-template">
<div class="level">
<div class="level-left">
<div class="level-item">
<b-input v-model="startValue"
ref="startValue"
@input="startValueChanged">
</b-input>
</div>
<div v-show="wantsRange"
class="level-item">
and
</div>
<div v-show="wantsRange"
class="level-item">
<b-input v-model="endValue"
ref="endValue"
@input="endValueChanged">
</b-input>
</div>
</div>
</div>
</script>
<script type="text/x-template" id="grid-filter-date-value-template">
<div class="level">
<div class="level-left">
@ -75,6 +99,13 @@
</option>
</b-select>
<grid-filter-numeric-value v-if="filter.data_type == 'number'"
v-model="filter.value"
v-show="valuedVerb()"
:wants-range="filter.verb == 'between'"
ref="valueInput">
</grid-filter-numeric-value>
<b-input v-if="filter.data_type == 'string' && !multiValuedVerb()"
v-model="filter.value"
v-show="valuedVerb()"