diff options
author | Andrew Cady <d@jerkface.net> | 2022-11-25 22:01:38 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2022-11-25 22:01:38 -0500 |
commit | 80ac7a255154ad4469a69ac94e2b60fd43f8f4c0 (patch) | |
tree | 6826462eb75b2504f2f53c7aff988d4886a0c827 | |
parent | a67e0abd36e9eb99f601b3861ea6b74231bfb152 (diff) |
move %1RM to its own column
-rwxr-xr-x | repgoal.hs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -192,6 +192,7 @@ accessoryLiftRow name targetReps (position, _) = map (padLeftRight 2) [ | |||
192 | txt " ", | 192 | txt " ", |
193 | txt " ", | 193 | txt " ", |
194 | txt " ", | 194 | txt " ", |
195 | txt " ", | ||
195 | txt " " | 196 | txt " " |
196 | ] | 197 | ] |
197 | unspecifiedLiftRow :: Text -> [Widget n] | 198 | unspecifiedLiftRow :: Text -> [Widget n] |
@@ -201,6 +202,7 @@ unspecifiedLiftRow name = map (padLeftRight 2) [ | |||
201 | txt " ", | 202 | txt " ", |
202 | txt " ", | 203 | txt " ", |
203 | txt " ", | 204 | txt " ", |
205 | txt " ", | ||
204 | txt " " | 206 | txt " " |
205 | ] | 207 | ] |
206 | 208 | ||
@@ -218,8 +220,9 @@ wendlerLiftRow LiftRecord{..} (position, (SetScheme targetRatio targetReps amrap | |||
218 | map (padLeftRight 2) | 220 | map (padLeftRight 2) |
219 | [ | 221 | [ |
220 | pad $ txt $ case position of FirstInList -> liftRecordName; NotFirstInList -> " ", | 222 | pad $ txt $ case position of FirstInList -> liftRecordName; NotFirstInList -> " ", |
221 | pad $ str $ printf "%2d%s @ %d (%s%%)" targetReps (if amrap then "+" else "" :: Text) targetWeight (showFloatConcise actualIntensity), | 223 | pad $ str $ printf "%2d%s @ %d" targetReps (if amrap then "+" else "" :: Text) targetWeight, |
222 | pad $ str $ showPlates targetWeight, | 224 | pad $ str $ showPlates targetWeight, |
225 | pad $ str $ showFloatConcise actualIntensity ++ "%", | ||
223 | str $ if amrap then showGoal repGoal ++ "\n" ++ showGoal (repGoal + 1) else " ", | 226 | str $ if amrap then showGoal repGoal ++ "\n" ++ showGoal (repGoal + 1) else " ", |
224 | pad $ txt " ", | 227 | pad $ txt " ", |
225 | pad $ txt " " | 228 | pad $ txt " " |
@@ -238,7 +241,7 @@ drawUI st = [vCenter $ vBox [hCenter $ hBox [header, oneRepMaxTable], withVScrol | |||
238 | liftNames = session & sessionLifts & fmap liftName & toList | 241 | liftNames = session & sessionLifts & fmap liftName & toList |
239 | liftRecords :: [LiftRecord] | 242 | liftRecords :: [LiftRecord] |
240 | liftRecords = filter ((`elem` liftNames) . liftRecordName) (view lifts st) | 243 | liftRecords = filter ((`elem` liftNames) . liftRecordName) (view lifts st) |
241 | lastSetTable = renderTable $ table $ map (padLeftRight 1 . txt) ["Lift", "Set", "Plates", "Goal", "Done", "Rest"] : concatMap (liftRows (view week st)) lifts' | 244 | lastSetTable = renderTable $ table $ map (padLeftRight 1 . txt) ["Lift", "Set", "Plates", "%1RM", "Goal", "Done", "Rest"] : concatMap (liftRows (view week st)) lifts' |
242 | header = renderTable $ table $ map (padLeftRight 1 . txt) | 245 | header = renderTable $ table $ map (padLeftRight 1 . txt) |
243 | ["Date", "Time", "Bodyweight", "Week", "Session"] | 246 | ["Date", "Time", "Bodyweight", "Week", "Session"] |
244 | : [ map (padLeftRight 2 . txt) [" ", " ", " ", weekNumber, sessionName session] ] | 247 | : [ map (padLeftRight 2 . txt) [" ", " ", " ", weekNumber, sessionName session] ] |