newUI #1
@ -140,7 +140,7 @@
|
||||
></b-form-input>
|
||||
</b-col>
|
||||
<b-col cols="1">
|
||||
<b-button v-on:click="deleteObservation(index)" variant="danger"
|
||||
<b-button v-on:click="deleteObservation(index)" variant="outline-danger"
|
||||
><b>Delete</b></b-button
|
||||
>
|
||||
</b-col>
|
||||
@ -159,6 +159,8 @@
|
||||
v-on:change="updateTotals()"
|
||||
class="my-3"
|
||||
></b-form-select>
|
||||
<div class="d-flex">
|
||||
<b-button class="mr-3" variant="outline-danger" size="sm" v-on:click="deleteEntry(index, entryIndex)" v-b-tooltip.hover title="Delete this entry">X</b-button>
|
||||
<score-selector
|
||||
:score-value="entry.rating"
|
||||
v-on:newselection="
|
||||
@ -166,6 +168,7 @@
|
||||
updateTotals();
|
||||
"
|
||||
></score-selector>
|
||||
</div>
|
||||
</b-col>
|
||||
<b-col cols="8">
|
||||
<b-form-textarea
|
||||
@ -331,6 +334,13 @@ export default {
|
||||
AFIs: "",
|
||||
});
|
||||
},
|
||||
deleteEntry: function(scenarioIndex, entryIndex) {
|
||||
this.$delete(this.scenarios[scenarioIndex].entries, entryIndex);
|
||||
if(this.scenarios[scenarioIndex].entries.length === 0) {
|
||||
this.addAnotherEntry(this.scenarios[scenarioIndex]);
|
||||
}
|
||||
this.updateTotals();
|
||||
},
|
||||
updateTotals: function() {
|
||||
var iTotals = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||
var counts = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||
|
Loading…
Reference in New Issue
Block a user