Merge branch 'feature/39-donation_list' of git.odit.services:lfk/selfservice into feature/39-donation_list

This commit is contained in:
Nicolai Ort 2021-04-06 21:25:12 +02:00
commit 3b4c11e4c0

View File

@ -216,7 +216,7 @@
<tbody class="text-gray-900 dark:text-gray-50"> <tbody class="text-gray-900 dark:text-gray-50">
<tr v-for="s in state.scans" :key="s.id"> <tr v-for="s in state.scans" :key="s.id">
<td class="px-4 py-3"> <td class="px-4 py-3">
<span v-text="s.distance"></span>m <span v-text="s.distance"></span>
</td> </td>
<td class="px-4 py-3" v-text="s.lapTime"></td> <td class="px-4 py-3" v-text="s.lapTime"></td>
</tr> </tr>
@ -365,6 +365,7 @@ axios.get(`${config.baseurl}api/runners/me/${accesstoken}/scans`)
.then(({ data }) => { .then(({ data }) => {
data.map(function(s) { data.map(function(s) {
s.lapTime = Math.floor(s.lapTime / 60) + 'min ' + (Math.floor(s.lapTime % 60) + "").padStart(2, "0") + "s" s.lapTime = Math.floor(s.lapTime / 60) + 'min ' + (Math.floor(s.lapTime % 60) + "").padStart(2, "0") + "s"
s.distance = Math.floor(s.distance / 1000) + 'km ' + (Math.floor(s.distance % 1000) + "").padStart(3, "0") + "m"
return s; return s;
}) })
data.filter(s => s.valid === true); data.filter(s => s.valid === true);