@extends('layouts.admin') @section('title', $member->full_name) @section('page-title', 'Member Profile') @section('page-subtitle', $member->member_id) @section('content')
@if(session('success'))
{{ session('success') }}
@endif
@if($member->profile_photo) @else
{{ substr($member->first_name, 0, 1) }}{{ substr($member->last_name, 0, 1) }}
@endif

{{ $member->full_name }}

{{ $member->member_id }}

{{ ucfirst($member->membership_status) }}
{{ $member->email }}
{{ $member->phone ?? 'No phone' }}
{{ $member->city ? $member->city . ', ' . $member->state : 'No address' }}
{{ $member->date_of_birth?->format('M d, Y') }} ({{ $member->age ?? 'N/A' }} years)
{{ ucfirst($member->marital_status ?? 'Not specified') }}
Member since {{ $member->membership_date?->format('M Y') ?? 'N/A' }}

Attendance Statistics

{{ $attendance_stats['total_services'] }}

Total Services

{{ $attendance_stats['this_month'] }}

This Month

{{ $attendance_stats['last_30_days'] }}

Last 30 Days

Giving Statistics

{{ $giving_stats['total_donations'] }}

Total Donations

${{ number_format($giving_stats['total_amount'], 2) }}

Total Amount

{{ $giving_stats['active_pledges'] }}

Active Pledges

Tithes & Welfare

View Digital Book

GHS {{ number_format($tithe_stats['this_year_tithes'], 2) }}

Tithes ({{ now()->year }})

{{ $tithe_stats['total_tithes'] }}

Total Tithe Payments

GHS {{ number_format($welfare_stats['this_year_welfare'], 2) }}

Welfare ({{ now()->year }})

{{ $welfare_stats['total_welfare'] }}

Total Welfare Payments

Recent Attendance

@forelse($member->attendances->take(5) as $attendance) @empty @endforelse
Date Service Check-in Time Method
{{ $attendance->service_date->format('M d, Y') }} {{ $attendance->service?->name }} {{ $attendance->check_in_time }} {{ str_replace('_', ' ', $attendance->check_in_method) }}
No attendance records

Family Information

@if($member->family)

{{ $member->family->family_name }}

Family Name

{{ ucfirst($member->family_role ?? 'Not specified') }}

Family Role

@if($member->family->members->count() > 1)

Other Family Members

@foreach($member->family->members as $familyMember) @if($familyMember->id !== $member->id)
{{ substr($familyMember->first_name, 0, 1) }}{{ substr($familyMember->last_name, 0, 1) }}

{{ $familyMember->full_name }}

{{ ucfirst($familyMember->family_role ?? '') }}

@endif @endforeach
@endif
@else

No family information available

@endif

Status Update

@csrf
@endsection