Feature: clickable program bar on Dashboard + program workout shortcut on Log page
Dashboard:
- The program bar at the top of the home page is now clickable and
navigates to the program detail page. Backend get_today_status now
returns program_id alongside name/day/total_days.
LogActivity:
- On mount, fetches the user's active catalog program and its today's
workout. If there's an uncompleted non-rest workout for today, a
featured 'Today's Program Workout' card appears at the top with an
exercise preview and a one-tap '✓ Complete — 75 pts' button.
- Tapping Complete fires the same /workout/{id}/complete endpoint as
ProgramDetail, surfaces weekly/completion bonuses in the success
message, and returns to the Dashboard.
- The standard category grid below is now relabeled 'Or log something
else' when a program workout is available.
This commit is contained in:
parent
087b91bc42
commit
42797b5462
3 changed files with 120 additions and 7 deletions
|
|
@ -126,6 +126,7 @@ async def get_today_status(db: AsyncSession, user_id: uuid.UUID) -> dict:
|
|||
"rewards_available": rewards,
|
||||
"week_points": week_pts,
|
||||
"weekly_target": weekly_tgt,
|
||||
"program_id": program["id"] if program else None,
|
||||
"program_day": program["day"] if program else None,
|
||||
"program_total_days": program["total_days"] if program else None,
|
||||
"program_name": program["name"] if program else None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue