From 4faa1f4ad64369ccddef5356ca78b9555d5738c6 Mon Sep 17 00:00:00 2001 From: WhyAsh5114 Date: Thu, 28 Dec 2023 20:32:59 +0530 Subject: [PATCH] created separate stats and exercises components --- .../exerciseSplits/view/[id]/+page.svelte | 42 +++++++ .../view/[id]/ViewSplitExercises.svelte | 15 +++ .../view/[id]/ViewSplitStats.svelte | 112 ++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 src/routes/exerciseSplits/view/[id]/ViewSplitExercises.svelte create mode 100644 src/routes/exerciseSplits/view/[id]/ViewSplitStats.svelte diff --git a/src/routes/exerciseSplits/view/[id]/+page.svelte b/src/routes/exerciseSplits/view/[id]/+page.svelte index e69de29b..4a3badc6 100644 --- a/src/routes/exerciseSplits/view/[id]/+page.svelte +++ b/src/routes/exerciseSplits/view/[id]/+page.svelte @@ -0,0 +1,42 @@ + + +

View split

+ +
+ + +
+ +{#if currentSection === "Stats"} + +{:else} + +{/if} + +
+ + +
diff --git a/src/routes/exerciseSplits/view/[id]/ViewSplitExercises.svelte b/src/routes/exerciseSplits/view/[id]/ViewSplitExercises.svelte new file mode 100644 index 00000000..db2443ca --- /dev/null +++ b/src/routes/exerciseSplits/view/[id]/ViewSplitExercises.svelte @@ -0,0 +1,15 @@ + + +
+ + {#if selectedSplitDayExercises} + + {/if} +
diff --git a/src/routes/exerciseSplits/view/[id]/ViewSplitStats.svelte b/src/routes/exerciseSplits/view/[id]/ViewSplitStats.svelte new file mode 100644 index 00000000..8f44f761 --- /dev/null +++ b/src/routes/exerciseSplits/view/[id]/ViewSplitStats.svelte @@ -0,0 +1,112 @@ + + +
+
+
Split name
+
{exerciseSplit.name}
+
+
+
Sets per cycle
+
{getTotalSetsOfSplit(exerciseSplit.splitDays)}
+
+
+
Avg. sets per day
+
+ {getAverageSetsPerDayOfSplit(exerciseSplit.splitDays).toFixed(2)} +
+
+
+
Split metrics
+
+ + + +
+
+ {#each muscleGroupStats.sort((a, b) => b[currentStat] - a[currentStat]) as stat} +
+
+ {stat.muscleGroup} + {stat[currentStat]} +
+ +
+ {/each} +
+
+