diff options
Diffstat (limited to 'repgoal.hs')
-rwxr-xr-x | repgoal.hs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -170,7 +170,7 @@ drawUI :: St -> [Widget ()] | |||
170 | drawUI st = [vCenter $ vBox [hCenter oneRepMaxTable, header, withVScrollBarHandles $ withVScrollBars OnRight $ viewport () Vertical $ hCenter lastSetTable]] | 170 | drawUI st = [vCenter $ vBox [hCenter oneRepMaxTable, header, withVScrollBarHandles $ withVScrollBars OnRight $ viewport () Vertical $ hCenter lastSetTable]] |
171 | where | 171 | where |
172 | lifts' = filter ((flip Set.member $ view routines st & NonEmpty.head) . liftName) (view lifts st) | 172 | lifts' = filter ((flip Set.member $ view routines st & NonEmpty.head) . liftName) (view lifts st) |
173 | lastSetTable = renderTable $ table $ map (padLeftRight 1 . str) ["Lift", "Set", "Goal"] : concatMap (toLiftRows (view week st)) lifts' | 173 | lastSetTable = renderTable $ table $ map (padLeftRight 1 . str) ["Lift", "Set", "Goal", "Done", "Rest"] : concatMap (toLiftRows (view week st)) lifts' |
174 | header = str $ "Week " ++ case (view week st) of Week1 -> "1"; Week2 -> "2"; Week3 -> "3" | 174 | header = str $ "Week " ++ case (view week st) of Week1 -> "1"; Week2 -> "2"; Week3 -> "3" |
175 | oneRepMaxTable = renderTable $ table $ map (padLeftRight 1 . str) ["Lift", "Achieved Best", "Computed 1RM"] : map toRow lifts' | 175 | oneRepMaxTable = renderTable $ table $ map (padLeftRight 1 . str) ["Lift", "Achieved Best", "Computed 1RM"] : map toRow lifts' |
176 | toRow LiftRecord{..} = | 176 | toRow LiftRecord{..} = |
@@ -198,9 +198,9 @@ drawUI st = [vCenter $ vBox [hCenter oneRepMaxTable, header, withVScrollBarHandl | |||
198 | -- txt $ if position == FirstInList then liftName else " ", | 198 | -- txt $ if position == FirstInList then liftName else " ", |
199 | txt $ case position of FirstInList -> liftName; LastInList -> " \n "; _ -> " ", | 199 | txt $ case position of FirstInList -> liftName; LastInList -> " \n "; _ -> " ", |
200 | str $ printf "%2d%s @ %d%s" targetReps (if position == LastInList then "+" else "" :: Text) targetWeight (if position == LastInList then "\n " else "" :: String), | 200 | str $ printf "%2d%s @ %d%s" targetReps (if position == LastInList then "+" else "" :: Text) targetWeight (if position == LastInList then "\n " else "" :: String), |
201 | str $ if position /= LastInList then " " else showGoal repGoal ++ "\n" ++ showGoal (repGoal + 1) | 201 | str $ if position /= LastInList then " " else showGoal repGoal ++ "\n" ++ showGoal (repGoal + 1), |
202 | -- str $ if position /= LastInList then " " else showGoal repGoal, | 202 | txt $ if position /= LastInList then " " else " \n ", |
203 | -- str $ if position /= LastInList then " " else showGoal (repGoal + 1) | 203 | txt $ if position /= LastInList then " " else " \n " |
204 | ] | 204 | ] |
205 | 205 | ||
206 | ceilingN :: Integer -> Rational -> Integer | 206 | ceilingN :: Integer -> Rational -> Integer |