Client - display notes
This commit is contained in:
parent
0c78b7a618
commit
63f8ef59ae
44
fittrackee_client/src/components/Workout/WorkoutNotes.vue
Normal file
44
fittrackee_client/src/components/Workout/WorkoutNotes.vue
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<div id="workout-note">
|
||||||
|
<Card :without-title="false">
|
||||||
|
<template #title>{{ t('workouts.NOTES') }}</template>
|
||||||
|
<template #content>
|
||||||
|
{{ notes && notes !== '' ? notes : t('workouts.NO_NOTES') }}</template
|
||||||
|
>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent } from 'vue'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
|
import Card from '@/components/Common/Card.vue'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'WorkoutNotes',
|
||||||
|
components: {
|
||||||
|
Card,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
notes: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
const { t } = useI18n()
|
||||||
|
return { t }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '~@/scss/base.scss';
|
||||||
|
|
||||||
|
#workout-note {
|
||||||
|
::v-deep(.card-content) {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -17,9 +17,11 @@
|
|||||||
"NO_DATA_CLEANING": "data from gpx, without any cleaning",
|
"NO_DATA_CLEANING": "data from gpx, without any cleaning",
|
||||||
"NO_MAP": "No map",
|
"NO_MAP": "No map",
|
||||||
"NO_NEXT_WORKOUT": "No next workout",
|
"NO_NEXT_WORKOUT": "No next workout",
|
||||||
|
"NO_NOTES": "No notes",
|
||||||
"NO_PREVIOUS_WORKOUT": "No previous workout",
|
"NO_PREVIOUS_WORKOUT": "No previous workout",
|
||||||
"NO_RECORDS": "No records.",
|
"NO_RECORDS": "No records.",
|
||||||
"NO_WORKOUTS": "No workouts.",
|
"NO_WORKOUTS": "No workouts.",
|
||||||
|
"NOTES": "Notes",
|
||||||
"PAUSES": "pauses",
|
"PAUSES": "pauses",
|
||||||
"PREVIOUS_WORKOUT": "Previous workout",
|
"PREVIOUS_WORKOUT": "Previous workout",
|
||||||
"RECORD": "record | records",
|
"RECORD": "record | records",
|
||||||
|
@ -17,9 +17,11 @@
|
|||||||
"NO_DATA_CLEANING": "données issues du fichier gpx, sans correction",
|
"NO_DATA_CLEANING": "données issues du fichier gpx, sans correction",
|
||||||
"NO_MAP": "Pas de carte",
|
"NO_MAP": "Pas de carte",
|
||||||
"NO_NEXT_WORKOUT": "Pas de séance suivante",
|
"NO_NEXT_WORKOUT": "Pas de séance suivante",
|
||||||
|
"NO_NOTES": "Pas de notes",
|
||||||
"NO_PREVIOUS_WORKOUT": "Pas de séances précédente",
|
"NO_PREVIOUS_WORKOUT": "Pas de séances précédente",
|
||||||
"NO_RECORDS": "Pas de records.",
|
"NO_RECORDS": "Pas de records.",
|
||||||
"NO_WORKOUTS": "Pas de séances.",
|
"NO_WORKOUTS": "Pas de séances.",
|
||||||
|
"NOTES": "Notes",
|
||||||
"PAUSES": "pauses",
|
"PAUSES": "pauses",
|
||||||
"PREVIOUS_WORKOUT": "Séance précédente",
|
"PREVIOUS_WORKOUT": "Séance précédente",
|
||||||
"RECORD": "record | records",
|
"RECORD": "record | records",
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
:authUser="authUser"
|
:authUser="authUser"
|
||||||
@getCoordinates="updateCoordinates"
|
@getCoordinates="updateCoordinates"
|
||||||
/>
|
/>
|
||||||
|
<WorkoutNotes :notes="workout.workout.notes" />
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<NotFound target="WORKOUT" />
|
<NotFound target="WORKOUT" />
|
||||||
@ -46,6 +47,7 @@
|
|||||||
import NotFound from '@/components/Common/NotFound.vue'
|
import NotFound from '@/components/Common/NotFound.vue'
|
||||||
import WorkoutChart from '@/components/Workout/WorkoutChart/index.vue'
|
import WorkoutChart from '@/components/Workout/WorkoutChart/index.vue'
|
||||||
import WorkoutDetail from '@/components/Workout/WorkoutDetail/index.vue'
|
import WorkoutDetail from '@/components/Workout/WorkoutDetail/index.vue'
|
||||||
|
import WorkoutNotes from '@/components/Workout/WorkoutNotes.vue'
|
||||||
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
|
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
|
||||||
import { IAuthUserProfile } from '@/types/user'
|
import { IAuthUserProfile } from '@/types/user'
|
||||||
import { IWorkoutState, TCoordinates } from '@/types/workouts'
|
import { IWorkoutState, TCoordinates } from '@/types/workouts'
|
||||||
@ -58,6 +60,7 @@
|
|||||||
NotFound,
|
NotFound,
|
||||||
WorkoutChart,
|
WorkoutChart,
|
||||||
WorkoutDetail,
|
WorkoutDetail,
|
||||||
|
WorkoutNotes,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
Loading…
Reference in New Issue
Block a user