Start work on workout plans.

Commit
d1d78981c2b075ab9685a27c13b6673e2085cbd1
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
Changed files
src/MyFitnessTracker-Components/MFTPublicLandingPage.class.st
index 93406184..1defbde0 100644..100644
@@ -11,6 +11,7 @@
11 11
12 12 ^ {
13 13 MFTMainPublicCard new.
14 Added: MFTWorkoutPlanCard new.
14 15 MFTWorkoutsCard new.
15 16 MFTWeightsCard new.
16 17 MFTPromisesCard new }
src/MyFitnessTracker-Components/MFTWorkoutPlanCard.class.st
index 00000000..f617b71f 000000..100644
@@ -0,0 +1,33 @@
1 Added: Class {
2 Added: #name : 'MFTWorkoutPlanCard',
3 Added: #superclass : 'MFTCard',
4 Added: #category : 'MyFitnessTracker-Components-Widgets',
5 Added: #package : 'MyFitnessTracker-Components',
6 Added: #tag : 'Widgets'
7 Added: }
8 Added:
9 Added: { #category : 'rendering' }
10 Added: MFTWorkoutPlanCard >> renderContentOn: html [
11 Added:
12 Added: self renderCardOn: html with: [
13 Added: html cardHeader: 'Current Plan'.
14 Added: html cardBody: [
15 Added: html paragraph:
16 Added: 'Great job completing ' , self session user currentPlan completion
17 Added: , ' workouts in your current plan!'.
18 Added: html form
19 Added: class: 'my-3';
20 Added: with: [
21 Added: html buttonGroup
22 Added: beSmall;
23 Added: with: [
24 Added: html outlineButton
25 Added: bePrimary;
26 Added: callback: [ self addWorkout ];
27 Added: with: 'Log workout'.
28 Added: html outlineButton
29 Added: beSecondary;
30 Added: callback: [ self viewAnalytics ];
31 Added: with: 'View progress' ] ].
32 Added: html render: MFTRepsDistributionGraph new ] ]
33 Added: ]
src/MyFitnessTracker/MFTWorkoutPlan.class.st
index 00000000..2eaa3706 000000..100644
@@ -0,0 +1,16 @@
1 Added: Class {
2 Added: #name : 'MFTWorkoutPlan',
3 Added: #superclass : 'SBSComponent',
4 Added: #instVars : [
5 Added: 'workouts'
6 Added: ],
7 Added: #category : 'MyFitnessTracker-Model',
8 Added: #package : 'MyFitnessTracker',
9 Added: #tag : 'Model'
10 Added: }
11 Added:
12 Added: { #category : 'accessing' }
13 Added: MFTWorkoutPlan >> workouts [
14 Added:
15 Added: ^ workouts
16 Added: ]