@extends('layouts.app') @php function calculateTimeDifference($date1, $date2) { $diff = $date1->diff($date2); $parts = []; if ($diff->y > 0) $parts[] = $diff->y . ' year' . ($diff->y > 1 ? 's' : ''); if ($diff->m > 0) $parts[] = $diff->m . ' month' . ($diff->m > 1 ? 's' : ''); if ($diff->d > 0) $parts[] = $diff->d . ' day' . ($diff->d > 1 ? 's' : ''); return implode(' ', $parts) ?: 'Same day'; } @endphp @section('content')
@if(session('success')) @endif @if(session('error')) @endif

Member Profile

Comprehensive member information and analytics

@if($relationship->dependent->media_gallery[0] ?? false) {{ $relationship->dependent->full_name }} @else
{{ strtoupper(substr($relationship->dependent->full_name, 0, 1)) }}
@endif

{{ $relationship->dependent->full_name }}

@if($relationship->relationship_type == 'self' || Auth::id() == $relationship->guardian_user_id) @else @endif
@if($relationship->dependent->motto)

"{{ $relationship->dependent->motto }}"

@endif
{{ $relationship->dependent->nationality }} {{ $relationship->dependent->gender == 'm' ? 'Male' : 'Female' }} Age {{ $relationship->dependent->age }} @php $horoscopeSymbols = [ 'Aries' => '♈', 'Taurus' => '♉', 'Gemini' => '♊', 'Cancer' => '♋', 'Leo' => '♌', 'Virgo' => '♍', 'Libra' => '♎', 'Scorpio' => '♏', 'Sagittarius' => '♐', 'Capricorn' => '♑', 'Aquarius' => '♒', 'Pisces' => '♓' ]; $horoscope = $relationship->dependent->horoscope ?? 'N/A'; $symbol = $horoscopeSymbols[$horoscope] ?? ''; @endphp {{ $symbol }} {{ $horoscope }} Active Joined {{ $relationship->dependent->created_at->format('F Y') }}
@if($relationship->dependent->social_links && count($relationship->dependent->social_links) > 0)
@php $socialLinks = $relationship->dependent->social_links; ksort($socialLinks); // Sort by platform name $socialIcons = [ 'facebook' => 'bi-facebook', 'twitter' => 'X', // Special case for Twitter/X 'instagram' => 'bi-instagram', 'linkedin' => 'bi-linkedin', 'youtube' => 'bi-youtube', 'tiktok' => 'bi-tiktok', 'snapchat' => 'bi-snapchat', 'whatsapp' => 'bi-whatsapp', 'telegram' => 'bi-telegram', 'discord' => 'bi-discord', 'reddit' => 'bi-reddit', 'pinterest' => 'bi-pinterest', 'twitch' => 'bi-twitch', 'github' => 'bi-github', 'spotify' => 'bi-spotify', 'skype' => 'bi-skype', 'slack' => 'bi-slack', 'medium' => 'bi-medium', 'vimeo' => 'bi-vimeo', 'messenger' => 'bi-messenger', 'wechat' => 'bi-wechat', 'line' => 'bi-line', ]; $socialTitles = [ 'facebook' => 'Facebook', 'twitter' => 'Twitter/X', 'instagram' => 'Instagram', 'linkedin' => 'LinkedIn', 'youtube' => 'YouTube', 'tiktok' => 'TikTok', 'snapchat' => 'Snapchat', 'whatsapp' => 'WhatsApp', 'telegram' => 'Telegram', 'discord' => 'Discord', 'reddit' => 'Reddit', 'pinterest' => 'Pinterest', 'twitch' => 'Twitch', 'github' => 'GitHub', 'spotify' => 'Spotify', 'skype' => 'Skype', 'slack' => 'Slack', 'medium' => 'Medium', 'vimeo' => 'Vimeo', 'messenger' => 'Messenger', 'wechat' => 'WeChat', 'line' => 'Line', ]; @endphp @foreach($socialLinks as $platform => $url) @if(!empty($url) && isset($socialIcons[$platform])) @if($platform === 'twitter') {{ $socialIcons[$platform] }} @else @endif @endif @endforeach
@endif
Profile Statistics

Key performance metrics and milestones

Total Sessions
127
Sessions completed this year
Total Revenue
$4250
Revenue generated this year
Attendance Rate
85%
Average session attendance
Member Since
1.5
Years of membership
Achievements
8
Total badges earned
Goal Completion
75%
Current goals achieved
Revenue Chart

Revenue analytics over time

Revenue chart visualization coming soon...

Chart will display revenue trends over time
Complete Payment & Revenue History

All package payments and revenue transactions in one view

Date Transaction Type Package/Item Duration Sessions Amount Status Method Evidence
2023-12-15 Package Payment Premium Fitness + Personal Training 2023-12-15 to 2024-06-15 18/24 649.5 BHD ✓ Paid Credit Card
2024-02-15 Package Payment Premium Fitness + Personal Training 2023-12-15 to 2024-06-15 18/24 649.5 BHD ○ Due Auto-pay -
2023-06-15 Package Payment Basic Gym Membership 2023-06-15 to 2023-12-15 Unlimited 599 BHD ✓ Paid Bank Transfer
2024-02-01 Package Payment Nutrition Consultation Package 2024-02-01 to 2024-05-01 0/6 450 BHD ○ Due Credit Card -
2024-01-08 Service/Product Personal Training Session - Paid - - 75 BHD ✓ Paid Credit Card -
2024-01-05 Service/Product Protein Supplement - Paid - - 45 BHD ✓ Paid Cash -
2024-01-01 Service/Product Monthly Membership - Due - - 99 BHD ✓ Paid Auto-pay -
Attendance Records

Attendance tracking coming soon...

Health Metrics Overview

Monitor health metrics and progress over time

@if($latestHealthRecord) @php $latestDate = $latestHealthRecord->recorded_at; $now = \Carbon\Carbon::now(); $diff = $latestDate->diff($now); @endphp
Snapshot Date: {{ $latestDate->format('F j, Y') }}
Time Since: @if($diff->y > 0) {{ $diff->y }} {{ $diff->y == 1 ? 'year' : 'years' }} @endif @if($diff->m > 0) {{ $diff->m }} {{ $diff->m == 1 ? 'month' : 'months' }} @endif @if($diff->d > 0) {{ $diff->d }} {{ $diff->d == 1 ? 'day' : 'days' }} @endif ago
@else
No health records available
@endif
@if($latestHealthRecord)
{{ $latestHealthRecord->weight ?? 'N/A' }}
Weight (kg)
{{ $latestHealthRecord->body_fat_percentage ?? 'N/A' }}%
Body Fat
{{ $latestHealthRecord->body_water_percentage ?? 'N/A' }}%
Body Water
{{ $latestHealthRecord->muscle_mass ?? 'N/A' }}
Muscle Mass
{{ $latestHealthRecord->bone_mass ?? 'N/A' }}
Bone Mass
{{ $latestHealthRecord->bmr ?? 'N/A' }}
BMR (cal)
@else

No health metrics available

@endif
Body Composition Analysis

Radar chart visualization coming soon...

Chart will compare current vs previous body composition metrics
Compare
@if($comparisonRecords->count() >= 2) @php $current = $comparisonRecords->first(); $previous = $comparisonRecords->skip(1)->first(); @endphp
@if($current && $previous) Time between records: {{ calculateTimeDifference($current->recorded_at, $previous->recorded_at) }} @else Select dates to see time difference @endif
@php function getChangeIcon($current, $previous) { if ($current > $previous) return ''; if ($current < $previous) return ''; return ''; } @endphp
Metric Current Change Previous
Weight {{ $current->weight ?? 'N/A' }}kg {!! $current->weight && $previous->weight ? getChangeIcon($current->weight, $previous->weight) : '-' !!} {{ $previous->weight ?? 'N/A' }}kg
Body Fat {{ $current->body_fat_percentage ?? 'N/A' }}% {!! $current->body_fat_percentage && $previous->body_fat_percentage ? getChangeIcon($current->body_fat_percentage, $previous->body_fat_percentage) : '-' !!} {{ $previous->body_fat_percentage ?? 'N/A' }}%
BMI {{ $current->bmi ?? 'N/A' }} {!! $current->bmi && $previous->bmi ? getChangeIcon($current->bmi, $previous->bmi) : '-' !!} {{ $previous->bmi ?? 'N/A' }}
Body Water {{ $current->body_water_percentage ?? 'N/A' }}% {!! $current->body_water_percentage && $previous->body_water_percentage ? getChangeIcon($current->body_water_percentage, $previous->body_water_percentage) : '-' !!} {{ $previous->body_water_percentage ?? 'N/A' }}%
Muscle Mass {{ $current->muscle_mass ?? 'N/A' }}kg {!! $current->muscle_mass && $previous->muscle_mass ? getChangeIcon($current->muscle_mass, $previous->muscle_mass) : '-' !!} {{ $previous->muscle_mass ?? 'N/A' }}kg
Bone Mass {{ $current->bone_mass ?? 'N/A' }}kg {!! $current->bone_mass && $previous->bone_mass ? getChangeIcon($current->bone_mass, $previous->bone_mass) : '-' !!} {{ $previous->bone_mass ?? 'N/A' }}kg
Visceral Fat {{ $current->visceral_fat ?? 'N/A' }} {!! $current->visceral_fat && $previous->visceral_fat ? getChangeIcon($current->visceral_fat, $previous->visceral_fat) : '-' !!} {{ $previous->visceral_fat ?? 'N/A' }}
BMR {{ $current->bmr ?? 'N/A' }}cal {!! $current->bmr && $previous->bmr ? getChangeIcon($current->bmr, $previous->bmr) : '-' !!} {{ $previous->bmr ?? 'N/A' }}cal
Protein {{ $current->protein_percentage ?? 'N/A' }}% {!! $current->protein_percentage && $previous->protein_percentage ? getChangeIcon($current->protein_percentage, $previous->protein_percentage) : '-' !!} {{ $previous->protein_percentage ?? 'N/A' }}%
Body Age {{ $current->body_age ?? 'N/A' }}yrs {!! $current->body_age && $previous->body_age ? getChangeIcon($current->body_age, $previous->body_age) : '-' !!} {{ $previous->body_age ?? 'N/A' }}yrs
@else

Need at least 2 health records to compare

@endif
Health Tracking History
@if($healthRecords->count() > 0)
@foreach($healthRecords as $record) @endforeach
Date Weight (kg) Body Fat % BMI Body Water % Muscle Mass (kg) Bone Mass (kg) Visceral Fat BMR Protein % Body Age
{{ $record->recorded_at->format('M j, Y') }} {{ $record->weight ?? '-' }} {{ $record->body_fat_percentage ?? '-' }} {{ $record->bmi ?? '-' }} {{ $record->body_water_percentage ?? '-' }} {{ $record->muscle_mass ?? '-' }} {{ $record->bone_mass ?? '-' }} {{ $record->visceral_fat ?? '-' }} {{ $record->bmr ?? '-' }} {{ $record->protein_percentage ?? '-' }} {{ $record->body_age ?? '-' }}
{{ $healthRecords->links() }}
@else

No health records found

Health tracking data will appear here once records are added
@endif
Goals & Progress

Goal tracking coming soon...

Achievements & Badges

Achievement system coming soon...

Tournament History

Tournament records coming soon...

Event Participation

Event history coming soon...

@endsection