From 5f536504393b216f1ee59ac38991c88e59dd511e Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 23 Oct 2022 16:47:06 -0400 Subject: add done/rest columns --- repgoal.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repgoal.hs b/repgoal.hs index 96cc534..31cfdcf 100755 --- a/repgoal.hs +++ b/repgoal.hs @@ -170,7 +170,7 @@ drawUI :: St -> [Widget ()] drawUI st = [vCenter $ vBox [hCenter oneRepMaxTable, header, withVScrollBarHandles $ withVScrollBars OnRight $ viewport () Vertical $ hCenter lastSetTable]] where lifts' = filter ((flip Set.member $ view routines st & NonEmpty.head) . liftName) (view lifts st) - lastSetTable = renderTable $ table $ map (padLeftRight 1 . str) ["Lift", "Set", "Goal"] : concatMap (toLiftRows (view week st)) lifts' + lastSetTable = renderTable $ table $ map (padLeftRight 1 . str) ["Lift", "Set", "Goal", "Done", "Rest"] : concatMap (toLiftRows (view week st)) lifts' header = str $ "Week " ++ case (view week st) of Week1 -> "1"; Week2 -> "2"; Week3 -> "3" oneRepMaxTable = renderTable $ table $ map (padLeftRight 1 . str) ["Lift", "Achieved Best", "Computed 1RM"] : map toRow lifts' toRow LiftRecord{..} = @@ -198,9 +198,9 @@ drawUI st = [vCenter $ vBox [hCenter oneRepMaxTable, header, withVScrollBarHandl -- txt $ if position == FirstInList then liftName else " ", txt $ case position of FirstInList -> liftName; LastInList -> " \n "; _ -> " ", str $ printf "%2d%s @ %d%s" targetReps (if position == LastInList then "+" else "" :: Text) targetWeight (if position == LastInList then "\n " else "" :: String), - str $ if position /= LastInList then " " else showGoal repGoal ++ "\n" ++ showGoal (repGoal + 1) - -- str $ if position /= LastInList then " " else showGoal repGoal, - -- str $ if position /= LastInList then " " else showGoal (repGoal + 1) + str $ if position /= LastInList then " " else showGoal repGoal ++ "\n" ++ showGoal (repGoal + 1), + txt $ if position /= LastInList then " " else " \n ", + txt $ if position /= LastInList then " " else " \n " ] ceilingN :: Integer -> Rational -> Integer -- cgit v1.2.3