[Pharo] Personal fitness tracker web app.
Incorporate minor ChatGPT feedback.
Changed files
- src/MyFitnessTracker-Web/MFTHomePage.class.st
- src/MyFitnessTracker-Web/MFTLogBookViewerComponent.class.st
- src/MyFitnessTracker-Web/MFTMainActionsComponent.class.st
- src/MyFitnessTracker-Web/MFTSetGroupLogEditorComponent.class.st
- src/MyFitnessTracker-Web/MFTSetGroupLogViewerComponent.class.st
- src/MyFitnessTracker-Web/MFTWorkoutLogViewerComponent.class.st
src/MyFitnessTracker-Web/MFTHomePage.class.st
@@ -18,7 +18,8 @@
18
18
^ {
19
19
statusComponent.
20
20
homePageActionsComponent.
21
Removed:
nextWorkoutComponent }
21
Added:
nextWorkoutComponent.
22
Added:
previousWorkoutLogsComponent }
22
23
]
23
24
24
25
{ #category : 'initialization' }
src/MyFitnessTracker-Web/MFTLogBookViewerComponent.class.st
@@ -32,7 +32,8 @@
32
32
{ #category : 'rendering' }
33
33
MFTLogBookViewerComponent >> initialize [
34
34
35
Removed:
super initialize
35
Added:
super initialize.
36
Added:
logBookItemComponents := OrderedCollection new
36
37
]
37
38
38
39
{ #category : 'accessing' }
src/MyFitnessTracker-Web/MFTMainActionsComponent.class.st
@@ -19,8 +19,7 @@
19
19
MFTMainActionsComponent >> renderContentOn: html [
20
20
21
21
html section: [
22
Removed:
html form: [
23
Removed:
html submitButton
24
Removed:
callback: [ onLogWorkout value ];
25
Removed:
with: 'Log workout' ] ]
22
Added:
html anchor
23
Added:
callback: [ onLogWorkout value ];
24
Added:
with: 'Log workout' ]
26
25
]
src/MyFitnessTracker-Web/MFTSetGroupLogEditorComponent.class.st
@@ -24,7 +24,7 @@
24
24
html legend: setGroupLog prescription canonicalName capitalized.
25
25
setGroupLog setsGroupedByExercise keysAndValuesDo: [ :exercise :sets |
26
26
self renderOn: html exercise: exercise sets: sets ].
27
Removed:
html submitButton
27
Added:
html button
28
28
callback: [ self answer: setGroupLog ];
29
29
with: 'Save' ]
30
30
]
@@ -36,7 +36,7 @@
36
36
style: 'margin-bottom: 1rem';
37
37
with: [
38
38
html heading
39
Removed:
level: 4;
39
Added:
level: 3;
40
40
with: exercise canonicalName capitalized.
41
41
html button
42
42
callback: [
src/MyFitnessTracker-Web/MFTSetGroupLogViewerComponent.class.st
@@ -34,7 +34,7 @@
34
34
{ #category : 'rendering' }
35
35
MFTSetGroupLogViewerComponent >> isEditable [
36
36
37
Removed:
isEditable
37
Added:
^ isEditable
38
38
]
39
39
40
40
{ #category : 'rendering' }
@@ -52,7 +52,7 @@
52
52
ifTrue: [ self renderSetGroupLogDataOn: html ]
53
53
ifFalse: [ self renderSetGroupLogExercisesOn: html ].
54
54
isEditable ifTrue: [
55
Removed:
html anchor
55
Added:
html button
56
56
callback: [
57
57
| editedLog |
58
58
editedLog := self call:
src/MyFitnessTracker-Web/MFTWorkoutLogViewerComponent.class.st
@@ -60,8 +60,8 @@
60
60
MFTWorkoutLogViewerComponent >> renderFormActionsOn: html [
61
61
62
62
^ html form: [
63
Removed:
html submitButton
64
Removed:
callback: [ onEdit ];
63
Added:
html button
64
Added:
callback: [ onEdit value ];
65
65
with: 'Edit' ]
66
66
]
67
67
@@ -71,7 +71,7 @@
71
71
html definitionList: [
72
72
html
73
73
definitionTerm: 'Start time';
74
Removed:
definitionData: workoutLog start asEmailString;
74
Added:
definitionData: workoutLog start asStringYMDHM;
75
75
definitionTerm: 'Duration';
76
76
definitionData:
77
77
workoutLog duration asMinutes rounded asString , ' minutes';