add solution
parent
92bba28b4c
commit
9c6f8ff749
|
|
@ -12,6 +12,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import {computed} from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
kuerzel: null,
|
kuerzel: null,
|
||||||
|
|
@ -26,6 +27,26 @@ function emitData() {
|
||||||
emit("deleteEntry", props.id)
|
emit("deleteEntry", props.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Colors = {
|
||||||
|
EXCELLENT: '#247d37',
|
||||||
|
GOOD: '#7ba656',
|
||||||
|
AVERAGE: '#ded147',
|
||||||
|
POOR: '#dea947',
|
||||||
|
FAIL: '#de6847',
|
||||||
|
};
|
||||||
|
|
||||||
|
const backgroundColor = computed(() => {
|
||||||
|
if (props.note <= 1.3)
|
||||||
|
return Colors.EXCELLENT;
|
||||||
|
if (props.note <= 2.3)
|
||||||
|
return Colors.GOOD;
|
||||||
|
if (props.note <= 3.3)
|
||||||
|
return Colors.AVERAGE;
|
||||||
|
if (props.note <= 4.3)
|
||||||
|
return Colors.POOR;
|
||||||
|
return Colors.FAIL;
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style></style>
|
||||||
Loading…
Reference in New Issue