Client - add link to workout in dashboard calendar and records

This commit is contained in:
Sam 2021-09-24 20:00:55 +02:00
parent 0cf61a46de
commit 663e81c96d
2 changed files with 16 additions and 2 deletions

View File

@ -1,5 +1,10 @@
<template>
<div class="calendar-workout">
<div
class="calendar-workout"
@click="
$router.push({ name: 'Workout', params: { workoutId: workout.id } })
"
>
<img alt="workout sport logo" :src="sportImg" :title="workout.title" />
<sup>
<i
@ -46,6 +51,7 @@
.calendar-workout {
padding: 2px 0;
cursor: pointer;
img {
max-width: 18px;
max-height: 18px;

View File

@ -17,7 +17,15 @@
t(`workouts.RECORD_${record.record_type}`)
}}</span>
<span class="record-value">{{ record.value }}</span>
<span class="record-date">{{ record.workout_date }}</span>
<span class="record-date">
<router-link
:to="{
name: 'Workout',
params: { workoutId: record.workout_id },
}"
>{{ record.workout_date }}</router-link
>
</span>
</div>
</template>
</Card>