Add multi-week workout programs
A Workout was a single flat session with no way to schedule several across weeks/days as a structured plan (e.g. Push/Pull/Legs over 4 weeks) - every user started from a blank builder each time, and there was no template concept at all. Adds a Program (title, description, week count) that Workouts can optionally belong to via nullable program_id/week_number/day_number columns, reusing all existing workout and session-tracking infrastructure rather than building a parallel system. The program show page lays out the schedule week by week and derives progress (completed vs total) from the user's existing WorkoutSession completions - no new enrollment/progress-tracking concept needed. Deleting a program unschedules its workouts (nullOnDelete) rather than destroying them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
<a href="{{ route('blog.index', [], false) }}" class="text-sm font-medium text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">{{ __('app.nav.blog') }}</a>
|
||||
@auth
|
||||
<a href="{{ route('dashboard') }}" class="text-sm font-medium text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">{{ __('app.nav.dashboard') }}</a>
|
||||
<a href="{{ route('programs.index') }}" class="text-sm font-medium text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">{{ __('app.nav.programs') }}</a>
|
||||
@if(Auth::user()->is_admin)
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-sm font-medium text-indigo-700 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-indigo-200">{{ __('app.nav.admin') }}</a>
|
||||
@endif
|
||||
@@ -98,6 +99,7 @@
|
||||
<x-responsive-nav-link :href="route('blog.index', [], false)">{{ __('app.nav.blog') }}</x-responsive-nav-link>
|
||||
@auth
|
||||
<x-responsive-nav-link :href="route('dashboard')">{{ __('app.nav.dashboard') }}</x-responsive-nav-link>
|
||||
<x-responsive-nav-link :href="route('programs.index')">{{ __('app.nav.programs') }}</x-responsive-nav-link>
|
||||
@if(Auth::user()->is_admin)
|
||||
<x-responsive-nav-link :href="route('admin.dashboard')">{{ __('app.nav.admin') }}</x-responsive-nav-link>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user