Click dates send to history page for given lottery.

This commit is contained in:
2020-10-11 12:25:26 +02:00
committed by KevinMidboe
parent 98c2707cb0
commit 584d497c6a

View File

@@ -22,7 +22,9 @@
<h4 class="el-spacing">Flasker vunnet:</h4>
<div v-for="win in winner.highscore">
<span class="date-won">{{ humanReadableDate(win.date) }} - {{ daysAgo(win.date) }} dager siden</span>
<router-link :to="winDateUrl(win.date)" class="days-ago">
{{ humanReadableDate(win.date) }} - {{ daysAgo(win.date) }} dager siden
</router-link>
<div class="won-wine">
<img :src="win.wine.image">
@@ -81,6 +83,10 @@ export default {
})
return colorOccurences
},
winDateUrl(date) {
const timestamp = new Date(date).getTime();
return `/history/${timestamp}`
},
humanReadableDate: humanReadableDate,
daysAgo: daysAgo
},