[Pharo] Personal fitness tracker web app.
If a workout is successfully created via the main public card, redirect to the logs page.
src/MyFitnessTracker/MFTMainPublicCard.class.st
@@ -12,7 +12,9 @@
12
12
| newWorkout |
13
13
newWorkout := self session pageManager activePage call:
14
14
MFTWorkoutForm new.
15
Removed:
newWorkout ifNil: [ ^ self ].
15
Added:
newWorkout
16
Added:
ifNil: [ ^ self ]
17
Added:
ifNotNil: [ self session pageManager setActivePageAt: #logs ].
16
18
17
19
self session user isLoggedIn
18
20
ifTrue: [ self session db insert: newWorkout ]