@extends('layouts.admin') @section('title', $user->name . ' - ' . ($user->club->name ?? config('app.name'))) @section('header')

{{ $user->name }}

@endsection @section('content')
@if($user->photo_url_medium) {{ $user->name }} @else
@endif
@if($user->is_active) Active @else Inactive @endif {{ $user->club?->member_reference_description ? $user->club->member_reference_description . ': ' : '' }}{{ $user->reference_number ?? '#' . $user->id }} @if($user->reference_number_2) {{ $user->club?->member_reference_description_2 ? $user->club->member_reference_description_2 . ': ' : '' }}{{ $user->reference_number_2 }} @endif @if($user->no_photo_permission) No Photos @endif

{{ $user->name }}

@if($user->telephone) @endif
@if(auth()->user()->role === 'club_manager' || auth()->user()->role === 'admin') Manage Member @endif @if(auth()->user()->role === 'admin') Impersonate @endif

Attendance

{{ $stats['total_attendance'] }} +{{ $stats['attendance_this_month'] }} this month

Current Rank

@if($user->rank)
@endif {{ $user->rank?->name ?? 'None' }}

Last Graded

{{ $stats['last_grading'] ? $stats['last_grading']->graded_at->format('M Y') : 'Never' }}

Member for

@php $diff = $stats['joined_date']->diff(now()); @endphp {{ $diff->y }} Yrs {{ $diff->m }} Mths

Grading Countdown

Current grade for @if($stats['time_since_last_grading']->y > 0) {{ $stats['time_since_last_grading']->y }} years @endif @if($stats['time_since_last_grading']->m > 0) {{ $stats['time_since_last_grading']->m }} months @endif

{{ $stats['sessions_since_last_grading'] }}

Sessions since grading

Attendance History

@if($stats['last_attendance'])

Latest session recorded on {{ $stats['last_attendance']->format('jS M Y') }}

@else

This member has never attended a session

@endif
@if($user->attendanceSessions->count() > 0)
@foreach($user->attendanceSessions as $index => $session)

{{ $session->venue->name }}

{{ $session->date->format('l, jS F Y') }}

@php $dateKey = $session->date->format('Y-m-d'); @endphp @if(isset($sessionNotes[$dateKey])) @endif {{ $session->created_at->format('H:i') }}
@endforeach
Page of
@if($user->attendanceSessions->count() > 5)
@endif @else

No attendance data recorded yet.

@endif

Grading History

Track student progress

@if($user->gradings->count() > 0)
@foreach($user->gradings as $index => $grading)
= 5) x-cloak x-transition @endif>

{{ $grading->rank->name }}

@if($loop->first) Current Grade @endif
{{ $grading->graded_at->format('jS M Y') }}
@endforeach
@if($user->gradings->count() > 5)
@endif @else

No grading history recorded.

@endif

Observation Log

Notes and feedback

@if($user->memberNotes->count() > 0)
@foreach($user->memberNotes as $index => $note)
= 3) x-cloak x-transition @endif>
@if($note->author->photo_url_thumbnail) {{ $note->author->name }} @else
{{ substr($note->author->name, 0, 1) }}
@endif {{ $note->author->name }}
{{ $note->created_at->format('jS M Y') }}

{{ $note->content }}

@endforeach
@if($user->memberNotes->count() > 3)
@endif @else

No observation log entries found.

@endif
@if($user->renewal_date)

Renewal Date

{{ $user->renewal_date->format('jS F') }}

@else

Renewal Date Not Set

Set renewal date now
@endif

Club Groups

@if($user->memberGroups->count() > 0)
@foreach($user->memberGroups as $group) {{ $group->name }} @endforeach
@else

Not assigned to any groups.

@endif

Personal Information

Age / Gender

{{ $user->age ?: 'Age unknown' }} / {{ trim($user->gender) && trim($user->gender) !== 'NULL' ? ucfirst($user->gender) : 'Unspecified' }}

Address

@php $addr1 = trim($user->address_1 ?? ''); $addr2 = trim($user->address_2 ?? ''); $city = trim($user->town_city ?? ''); $county = trim($user->county ?? ''); $postcode = trim($user->postcode ?? ''); if ($addr1 === 'NULL') $addr1 = ''; if ($addr2 === 'NULL') $addr2 = ''; if ($city === 'NULL') $city = ''; if ($county === 'NULL') $county = ''; if ($postcode === 'NULL') $postcode = ''; @endphp @if($addr1) {{ $addr1 }}
@endif @if($addr2) {{ $addr2 }}
@endif @if($city || $county || $postcode) {{ $city }}@if($city && ($county || $postcode)), @endif {{ $county }} {{ $postcode }} @endif @if(!$addr1 && !$addr2 && !$city && !$county && !$postcode) No address provided @endif

Member Since

{{ $stats['joined_date']->format('jS F, Y') }}

Medical & Safety

Emergency Contact

@php $emergencyName = trim($user->emergency_contact_name ?? ''); $emergencyPhone = trim($user->emergency_contact_telephone ?? ''); if ($emergencyName === 'NULL') $emergencyName = ''; if ($emergencyPhone === 'NULL') $emergencyPhone = ''; @endphp

{{ $emergencyName ?: 'Not assigned' }}

@if($emergencyPhone)

{{ $emergencyPhone }}

@endif
@php $parentName = trim($user->parent_guardian_name ?? ''); if ($parentName === 'NULL') $parentName = ''; @endphp @if($parentName)

Parent / Guardian

{{ $parentName }}

@endif

Medical Information

@php $medicalNotes = trim($user->medical_notes ?? ''); if ($medicalNotes === 'NULL') $medicalNotes = ''; @endphp

{{ $medicalNotes ?: 'No medical information disclosed.' }}

@endsection