Add weight and reps to popover

This commit is contained in:
Peter Stockings
2023-12-07 20:58:03 +11:00
parent 3fca116d1c
commit 9c69005f7c

2
db.py
View File

@@ -490,6 +490,6 @@ class DataBase():
# Get a list of all start_dates # Get a list of all start_dates
start_dates = [t['start_date'] for t in topsets] start_dates = [t['start_date'] for t in topsets]
# Create a list of messages with the structure 'estimated_1rm kg on start_date' with start_date formatted as 'dd/mm/yyyy' # Create a list of messages with the structure 'estimated_1rm kg on start_date' with start_date formatted as 'dd/mm/yyyy'
messages = [f'{t["estimated_1rm"]}kg on {t["start_date"].strftime("%d/%m/%Y")}' for t in topsets] messages = [f'{t["repetitions"]} x {t["weight"]}kg ({t["estimated_1rm"]}kg E1RM) on {t["start_date"].strftime("%d/%m/%Y")}' for t in topsets]
return (estimated_1rm, start_dates, messages) return (estimated_1rm, start_dates, messages)