diff --git a/src/routes/fitness/workout/active/+page.svelte b/src/routes/fitness/workout/active/+page.svelte index 20dd65e..086b45a 100644 --- a/src/routes/fitness/workout/active/+page.svelte +++ b/src/routes/fitness/workout/active/+page.svelte @@ -1,6 +1,6 @@ -{#if workout.active} +{#if completionData} +
+
+

Workout Complete

+ {#if completionData.prs.length > 0} +
+ {completionData.prs.length} + +
+ {/if} +

{completionData.name}

+
+ +
+
+ + {formatDuration(completionData.durationMin)} + Duration +
+ {#if completionData.totalTonnage > 0} +
+ + + {completionData.totalTonnage >= 1000 + ? `${(completionData.totalTonnage / 1000).toFixed(1)}t` + : `${Math.round(completionData.totalTonnage)} kg`} + + Tonnage +
+ {/if} + {#if completionData.totalDistance > 0} +
+ + {completionData.totalDistance.toFixed(1)} km + Distance +
+ {/if} +
+ + {#if completionData.prs.length > 0} +
+

Personal Records

+
+ {#each completionData.prs as pr} +
+ {getExerciseById(pr.exerciseId)?.name ?? pr.exerciseId} + {pr.type}: {pr.value} +
+ {/each} +
+
+ {/if} + +
+

Exercises

+ {#each completionData.exerciseSummaries as ex} +
+
+ {getExerciseById(ex.exerciseId)?.name ?? ex.exerciseId} + {ex.sets} set{ex.sets !== 1 ? 's' : ''} +
+
+ {#if ex.isCardio} + {#if ex.distance > 0} + {ex.distance.toFixed(1)} km + {/if} + {#if ex.duration > 0} + {ex.duration} min + {/if} + {#if ex.pace > 0} + {formatPace(ex.pace)} avg + {/if} + {:else} + {#if ex.tonnage > 0} + {ex.tonnage >= 1000 ? `${(ex.tonnage / 1000).toFixed(1)}t` : `${Math.round(ex.tonnage)} kg`} volume + {/if} + {#if ex.bestWeight > 0} + Top: {ex.bestWeight} kg + {/if} + {#if ex.bestEst1rm > 0} + e1RM: {ex.bestEst1rm} kg + {/if} + {/if} +
+
+ {/each} +
+ + +
+ +{:else if workout.active}
@@ -159,7 +388,7 @@ -
@@ -174,6 +403,142 @@ {/if}