Add projected top set estimates
This commit is contained in:
@@ -244,6 +244,8 @@ def get_exercise_progress_for_user(person_id, exercise_id):
|
||||
forecast_enabled = request.args.get('forecast', '').lower() in ('1', 'true', 'yes', 'on')
|
||||
forecast_weeks = request.args.get('forecast_weeks', type=int, default=8)
|
||||
forecast_weeks = max(4, min(forecast_weeks, 26))
|
||||
forecast_target_reps = request.args.get('forecast_reps', type=int, default=5)
|
||||
forecast_target_reps = max(1, min(forecast_target_reps, 12))
|
||||
|
||||
if epoch == 'Custom' and (min_date is None or max_date is None):
|
||||
(min_date, max_date) = db.get_exercise_earliest_and_latest_dates(person_id, exercise_id)
|
||||
@@ -256,7 +258,8 @@ def get_exercise_progress_for_user(person_id, exercise_id):
|
||||
epoch,
|
||||
degree=degree,
|
||||
forecast_enabled=forecast_enabled,
|
||||
forecast_weeks=forecast_weeks
|
||||
forecast_weeks=forecast_weeks,
|
||||
forecast_target_reps=forecast_target_reps
|
||||
)
|
||||
|
||||
if not exercise_progress:
|
||||
|
||||
Reference in New Issue
Block a user