Add control to reset comparisons view

This commit is contained in:
D. Berge
2025-08-19 19:27:03 +02:00
parent b7543aa6c4
commit fe7c016dea

View File

@@ -29,7 +29,6 @@
:headers="projectHeaders"
:items="projects"
dense
hide-default-footer
>
<template v-slot:item.baseline="{item, value, index}">
@@ -73,6 +72,15 @@
{{ (value/1000).toFixed(1) }} km
</template>
<template v-slot:footer.prepend>
<v-btn v-if="comparison"
text
color="primary"
title="Back to summary"
@click="clearComparison"
>Back</v-btn>
</template>
</v-data-table>
<!-- BEGIN TEST -->
@@ -228,7 +236,13 @@ export default {
}
},
clearComparison () {
this.baseline = null;
this.monitor = null;
},
setComparison (baseline, monitor) {
this.clearComparison();
this.setBaseline(baseline);
this.setMonitor(monitor);
},