@extends('admin.layouts.app') @section('title', $student->name) @section('content')
โ† Students

{{ $student->name }}

{{ $student->email }}

โœ๏ธ Edit
@csrf @method('DELETE')
{{-- Column 1: Student Info + Barcode --}}

Student Details

@foreach([ ['Student ID', $student->student_id ?? 'โ€”'], ['Phone', $student->phone ?? 'โ€”'], ['Course', $student->course ?? 'โ€”'], ['Year Level', $student->year_level ?? 'โ€”'], ['Section', $student->section ?? 'Unassigned'], ['Registered', $student->created_at->format('M d, Y')], ['Account', $student->is_active ? 'Active' : 'Inactive'], ['Attendance', $student->attendances_count . ' records'], ] as [$label, $value])
{{ $label }} {{ $value }}
@endforeach {{-- Barcode --}}
Barcode for {{ $student->name }}

{{ $student->barcode }}

@csrf
{{-- Column 2: Subscription Toggle --}}

Subscription

{{-- Current Status Card --}}
{{ $student->isSubscriptionActive() ? 'โœ…' : 'โŒ' }}
{{ ucfirst($student->payment_status) }}
Tier: {{ ucfirst($student->tier) }}
@if($student->expires_at)
Expires: {{ $student->expires_at->format('M d, Y') }} @if($student->isSubscriptionActive()) ยท {{ $student->daysUntilExpiry() }} days remaining @endif
@endif
{{-- TOGGLE ON: Activate 30-day --}}
@csrf

Sets expiry to 30 days from today.

{{-- TOGGLE OFF: Deactivate --}} @if($student->isSubscriptionActive())
@csrf
@endif {{-- Record Manual Payment --}}
๐Ÿ’ณ Record Manual Payment
@csrf
{{-- Payment History --}}

Payment History

@forelse($payments as $pay)
{{ $pay->tier->name ?? 'โ€”' }} โ€” โ‚ฆ{{ $pay->amount }}
{{ $pay->paid_at?->format('M d, Y') }} ยท {{ ucfirst(str_replace('_', ' ', $pay->payment_method)) }}
{{ $pay->reference }}
@empty

No payment records.

@endforelse
{{-- Column 3: Move Student --}}

Move to Section

@csrf
{{-- Attendance Log --}}

๐Ÿ“… Attendance Log

@forelse($attendances as $a) @empty @endforelse
Date Check-In Check-Out Duration Status
{{ $a->checked_in_at->format('M d, Y') }} {{ $a->checked_in_at->format('H:i:s') }} {{ $a->checked_out_at ? $a->checked_out_at->format('H:i:s') : 'โ€”' }} {{ $a->duration ?? 'โ€”' }} {{ ucfirst($a->status) }}
No attendance records yet.
{{ $attendances->links() }}
@endsection