Skip to content

Commit

Permalink
feat: cancel workout (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
crlssn authored Nov 21, 2024
1 parent 99e6eb7 commit 6dceffb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions apps/web/src/views/Workouts/WorkoutRoutine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ const finishWorkout = async () => {
workoutStore.removeWorkout(routineID)
await router.push(`/workouts`)
}
const cancelWorkout = async () => {
workoutStore.removeWorkout(routineID)
await router.push(`/routines/${routineID}`)
}
</script>

<template>
Expand Down Expand Up @@ -174,8 +179,10 @@ const finishWorkout = async () => {
/>
</div>
</div>
<AppButton type="submit" colour="primary" class="mt-6"> Finish Workout</AppButton>
<AppButton type="button" colour="red" class="mt-6">Discard Workout</AppButton>
<AppButton type="submit" colour="primary" class="mt-6">Finish Workout</AppButton>
<AppButton type="button" colour="gray" class="mt-6" @click="cancelWorkout"
>Cancel Workout</AppButton
>
</form>
</template>

Expand Down

0 comments on commit 6dceffb

Please sign in to comment.