@php $inputClass = 'w-full rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-white shadow-sm focus:border-primary-500 focus:ring-1 focus:ring-primary-500 transition'; $statusColors = [ 'active' => 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400', 'inactive' => 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400', 'suspended' => 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400', 'pending' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400', ]; @endphp
{{-- Header --}}

Parents Management

View parent accounts, linked children, enrollment progress, and test results.

{{-- Search --}}
{{-- Parents Table --}}
@forelse($parents as $parent) @empty @endforelse
Parent Children Status Joined Actions
{{ $parent['name'] }}
{{ $parent['email'] }}
{{ $parent['children_count'] }} @php $sColor = $statusColors[$parent['status'] ?? ''] ?? 'bg-gray-100 text-gray-600'; @endphp {{ ucfirst($parent['status']) }} {{ $parent['created_at'] }}
@if(($parent['status'] ?? '') === 'suspended') @else @endif

No parents found.

{{-- View Parent Details Modal --}} @if($showViewModal && $viewParent)

Parent Details

{{-- Parent Info --}}

Name

{{ $viewParent['name'] }}

Email

{{ $viewParent['email'] }}

Status

@php $pColor = $statusColors[$viewParent['status'] ?? ''] ?? 'bg-gray-100 text-gray-600'; @endphp{{ ucfirst($viewParent['status']) }}

Joined

{{ $viewParent['created_at'] }}

{{-- Linked Children --}}

Linked Children ({{ count($linkedChildren) }})

@forelse($linkedChildren as $child)

{{ $child['name'] }}

{{ $child['email'] }}

@php $cStatus = $statusColors[$child['status'] ?? ''] ?? 'bg-gray-100 text-gray-600'; @endphp {{ ucfirst($child['status']) }} @if($child['link_verified']) Verified @else Pending @endif
{{-- Child's Enrollments --}} @if(count($child['enrollments']) > 0) @foreach($child['enrollments'] as $enrollment) @endforeach
Course Status Progress
{{ $enrollment['course_name'] }} @php $eColor = match($enrollment['status']) { 'active','enrolled' => 'text-green-600', 'completed' => 'text-blue-600', 'dropped' => 'text-red-600', default => 'text-gray-500' }; @endphp {{ ucfirst($enrollment['status']) }}
{{ (int) $enrollment['progress'] }}%
@else

No course enrollments found.

@endif
@empty

No linked children found for this parent.

@endforelse
@endif {{-- Suspend Confirmation Modal --}} @if($showSuspendModal)

Suspend Parent Account

You are about to suspend:

{{ $suspendParentName }}

This will prevent the parent from logging in and viewing their children's progress.

@endif