feature/11-user-scans #13
@ -142,9 +142,7 @@
|
|||||||
<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>m
|
||||||
</td>
|
</td>
|
||||||
<td class="px-4 py-3">
|
<td class="px-4 py-3" v-text="s.lapTime"></td>
|
||||||
<span v-text="s.lapTime"></span>s
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -201,8 +199,12 @@ axios.get(`${config.baseurl}api/runners/me/${token}`)
|
|||||||
})
|
})
|
||||||
axios.get(`${config.baseurl}api/runners/me/${token}/scans`)
|
axios.get(`${config.baseurl}api/runners/me/${token}/scans`)
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
|
data.map(function(s) {
|
||||||
|
s.lapTime = Math.floor(s.lapTime / 60) + 'min ' + (Math.floor(s.lapTime % 60) + "").padStart(2, "0") + "s"
|
||||||
|
return s;
|
||||||
|
})
|
||||||
|
data.filter(s => s.valid === true);
|
||||||
state.scans = data;
|
state.scans = data;
|
||||||
// TODO: filter for valid=true scans only
|
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
toast.error("An error occured while loading your profile data");
|
toast.error("An error occured while loading your profile data");
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user