@extends('components.app-layout') @section('title', 'Members') @php $dynamicSubtitle = 'Manage ' . ($organizationSettings['name'] ?? 'Presbyterian Church of Ghana') . ' members and their information'; @endphp @section('subtitle', $dynamicSubtitle) @section('content')

Total Members

{{ $stats['total_members'] ?? 0 }}

Active community

New This Month

{{ $stats['new_members'] ?? 0 }}

Recent additions

Total Families

{{ $stats['total_families'] ?? 0 }}

Family units

Active Ministries

{{ $stats['active_ministries'] ?? 0 }}

Service areas

Pending Approval

{{ $stats['pending_members'] ?? 0 }}

Awaiting review
@if(($stats['pending_members'] ?? 0) > 0)
ACTION NEEDED
@else
@endif

Church Members

Manage your congregation members and their details

Add Member
@if(request()->hasAny(['search', 'status', 'type', 'gender', 'day_born', 'marital_status', 'highest_qualification', 'family_id', 'year_group_id', 'ministry_id']))
Active filters: @if(request('search')) Search: "{{ request('search') }}" @endif @if(request('status')) Status: {{ ucfirst(request('status')) }} @endif @if(request('type')) Type: {{ ucfirst(request('type')) }} @endif @if(request('year_group_id')) @php $yearGroup = \App\Models\YearGroup::find(request('year_group_id')); @endphp @if($yearGroup) Year Group: {{ $yearGroup->name }} @endif @endif @if(request('gender')) Gender: {{ ucfirst(request('gender')) }} @endif @if(request('day_born')) Day Born: {{ request('day_born') }} @endif @if(request('marital_status')) Marital Status: {{ ucfirst(request('marital_status')) }} @endif @if(request('highest_qualification')) Qualification: {{ ucfirst(str_replace('_', ' ', request('highest_qualification'))) }} @endif Clear all
@endif
@forelse($members ?? [] as $member)
@if($member->photo_path ?? false) {{ $member->full_name }} @else @endif

{{ $member->full_name ?? 'John Doe' }}

{{ $member->member_id ?? 'M2025001' }}

@if($member->date_of_birth)

Age: {{ \Carbon\Carbon::parse($member->date_of_birth)->age }}

@endif
@if($member->email)
{{ $member->email }}
@endif @if($member->phone)
{{ $member->phone }}
@endif @if($member->family)
{{ $member->family->family_name }}
@endif @if($member->membership_date)
Joined {{ $member->membership_date->format('M Y') }}
@endif @if($member->ministries && $member->ministries->count() > 0)
{{ $member->ministries->count() }} {{ Str::plural('Ministry', $member->ministries->count()) }}
@endif
{{ ucfirst($member->membership_status ?? 'Active') }} @php $membershipType = $member->membership_type ?? 'communicant'; $typeGradients = [ 'communicant' => 'from-blue-100 to-blue-200 text-blue-800', 'baptized' => 'from-green-100 to-green-200 text-green-800', 'confirmed' => 'from-purple-100 to-purple-200 text-purple-800', 'long_distance' => 'from-orange-100 to-orange-200 text-orange-800', 'adherent' => 'from-yellow-100 to-yellow-200 text-yellow-800', 'catechumen' => 'from-pink-100 to-pink-200 text-pink-800' ]; $typeLabels = [ 'communicant' => 'Communicant', 'baptized' => 'Baptized', 'confirmed' => 'Confirmed', 'long_distance' => 'Long Distance', 'adherent' => 'Adherent', 'catechumen' => 'Catechumen' ]; @endphp {{ $typeLabels[$membershipType] ?? ucfirst($membershipType) }} @if($member->yearGroup) {{ $member->yearGroup->abbreviation ?? $member->yearGroup->name }} @endif
@empty

No members found

Get started by adding your first church member.

Add First Member
@endforelse
@if(isset($members) && $members->hasPages())
{{ $members->links() }}
@endif
@endsection