newUI #1
@ -140,7 +140,7 @@
|
|||||||
></b-form-input>
|
></b-form-input>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1">
|
<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>Delete</b></b-button
|
||||||
>
|
>
|
||||||
</b-col>
|
</b-col>
|
||||||
@ -159,6 +159,8 @@
|
|||||||
v-on:change="updateTotals()"
|
v-on:change="updateTotals()"
|
||||||
class="my-3"
|
class="my-3"
|
||||||
></b-form-select>
|
></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-selector
|
||||||
:score-value="entry.rating"
|
:score-value="entry.rating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
@ -166,6 +168,7 @@
|
|||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
@ -331,6 +334,13 @@ export default {
|
|||||||
AFIs: "",
|
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() {
|
updateTotals: function() {
|
||||||
var iTotals = [0, 0, 0, 0, 0, 0, 0, 0];
|
var iTotals = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||||
var counts = [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