Moved warning state comparison value to a defined variable

This commit is contained in:
neviyn 2018-12-18 14:10:55 +00:00
parent 396046c3b2
commit 28d75df455

View File

@ -8,49 +8,49 @@
<b-container class="sidebar">
<b-row align-v="center" class="sidebar-vert-padding" v-if="totals[0] > 0">
<b-col class="centered-image">
<img src="../assets/Monitoring.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[0] < 2.5 }"/>
<img src="../assets/Monitoring.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[0] < warningBound }"/>
<div class="image-centered-text">{{ totals[0] }}</div>
</b-col>
</b-row>
<b-row align-v="center" class="sidebar-vert-padding" v-if="totals[1] > 0">
<b-col class="centered-image">
<img src="../assets/Control.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[1] < 2.5 }"/>
<img src="../assets/Control.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[1] < warningBound }"/>
<div class="image-centered-text">{{ totals[1] }}</div>
</b-col>
</b-row>
<b-row align-v="center" class="sidebar-vert-padding" v-if="totals[2] > 0">
<b-col class="centered-image">
<img src="../assets/Control.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[2] < 2.5 }"/>
<img src="../assets/Control.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[2] < warningBound }"/>
<div class="image-centered-text">{{ totals[2] }}</div>
</b-col>
</b-row>
<b-row align-v="center" class="sidebar-vert-padding" v-if="totals[3] > 0">
<b-col class="centered-image">
<img src="../assets/Conservatism.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[3] < 2.5 }"/>
<img src="../assets/Conservatism.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[3] < warningBound }"/>
<div class="image-centered-text">{{ totals[3] }}</div>
</b-col>
</b-row>
<b-row align-v="center" class="sidebar-vert-padding" v-if="totals[4] > 0">
<b-col class="centered-image">
<img src="../assets/Teamwork.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[4] < 2.5 }"/>
<img src="../assets/Teamwork.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[4] < warningBound }"/>
<div class="image-centered-text">{{ totals[4] }}</div>
</b-col>
</b-row>
<b-row align-v="center" class="sidebar-vert-padding" v-if="totals[5] > 0">
<b-col class="centered-image">
<img src="../assets/Teamwork.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[5] < 2.5 }"/>
<img src="../assets/Teamwork.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[5] < warningBound }"/>
<div class="image-centered-text">{{ totals[5] }}</div>
</b-col>
</b-row>
<b-row align-v="center" class="sidebar-vert-padding" v-if="totals[6] > 0">
<b-col class="centered-image">
<img src="../assets/Teamwork.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[6] < 2.5 }"/>
<img src="../assets/Teamwork.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[6] < warningBound }"/>
<div class="image-centered-text">{{ totals[6] }}</div>
</b-col>
</b-row>
<b-row align-v="center" class="sidebar-vert-padding" v-if="totals[7] > 0">
<b-col class="centered-image">
<img src="../assets/Knowledge.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[7] < 2.5 }"/>
<img src="../assets/Knowledge.svg" class="image-opacity" v-bind:class="{ scorewarning: totals[7] < warningBound }"/>
<div class="image-centered-text">{{ totals[7] }}</div>
</b-col>
</b-row>
@ -317,6 +317,7 @@ export default {
}
],
totals: [0, 0, 0, 0, 0, 0, 0, 0],
warningBound: 2.5,
submitPassword: null
};
},