Skip to content

Commit

Permalink
Add null to scenario criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
nioc committed Nov 13, 2021
1 parent 4e7ebfe commit 230b0dc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/admin/ScenarioCriteria.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@
</div>

<div class="field">
<p v-if="factType !== 'boolean'" class="control is-expanded">
<input v-if="factType === 'numeric'" v-model.number="criteria.value" class="input" type="number" required>
<input v-else v-model="criteria.value" class="input" type="text" required>
</p>
<div v-if="factType !== 'boolean'" class="field has-addons">
<div class="control is-expanded">
<input v-if="factType === 'numeric'" v-model.number="criteria.value" class="input" type="number" :placeholder="criteria.value === null ? 'null' : ''" required>
<input v-else v-model="criteria.value" class="input" type="text" :placeholder="criteria.value === null ? 'null' : ''" required>
</div>
<div v-if="criteria.value !== null" class="control">
<button class="button" style="height: 40px;width: 40px;" title="Valoriser la valeur à null" @click="criteria.value = null"><i class="fas fa-eraser" /></button>
</div>
</div>
</div>

<div class="buttons">
Expand Down

0 comments on commit 230b0dc

Please sign in to comment.