{{-- Gradient Header --}}

Edit Routine

Update "{{ $routine->title }}"

{{-- Two-Panel Layout --}}
{{-- Left Panel --}}
Routine Info
@if($routine->frequency === 'daily') @elseif($routine->frequency === 'weekly') @else @endif
{{ $routine->title }}
{{ ucfirst($routine->frequency) }}
@if($routine->start_time)
{{ \Carbon\Carbon::parse($routine->start_time)->format('g:i A') }} @if($routine->end_time) – {{ \Carbon\Carbon::parse($routine->end_time)->format('g:i A') }} @endif
@endif @if($routine->frequency === 'daily' && count($currentDays))
{{ implode(', ', array_map(fn($d) => ucfirst(substr($d,0,3)), $currentDays)) }}
@endif @if($routine->frequency === 'weekly' && count($currentWeeks))
{{ count($currentWeeks) }} week{{ count($currentWeeks) > 1 ? 's' : '' }} selected
@endif @if($routine->frequency === 'monthly' && count($currentMonths))
{{ implode(', ', array_map(fn($m) => \Carbon\Carbon::createFromDate(null,(int)$m,1)->format('M'), $currentMonths)) }}
@endif
Updated {{ $routine->updated_at->format('M d, Y') }}
{{-- Right Form --}}
@csrf @method('PUT')
{{-- Basic Info --}}
Basic Info
@error('title')
{{ $message }}
@enderror
@error('description')
{{ $message }}
@enderror
{{-- Schedule --}}
Schedule Frequency & recurrence
@error('frequency')
{{ $message }}
@enderror
{{-- Day picker --}}
Select days
@foreach(['monday','tuesday','wednesday','thursday','friday','saturday','sunday'] as $day)
@endforeach
{{-- Week picker --}}
Select weeks (1 - 52)
@for($w = 1; $w <= 52; $w++)
@endfor
{{-- Month picker --}}
Select months
@foreach(['January','February','March','April','May','June','July','August','September','October','November','December'] as $idx => $month)
@endforeach
{{-- Time Window --}}
Time Window Start & end time
@error('start_time')
{{ $message }}
@enderror
@error('end_time')
{{ $message }}
@enderror
Cancel
{{-- /.cu-layout --}} {{-- Danger Zone --}}
Danger Zone
Permanently delete this routine. This action cannot be undone.
@csrf @method('DELETE')