@extends('front_end.layouts.home') @php $showRightSidebar = false; @endphp @section('title', 'Donor Profile') @section('left_sidebar') @include('front_end.pages.bloodbank.bloodbank_left_sidebar') @endsection @section('content')

Donor Profile

Manage your blood donation profile and history

Your Donor Profile
@if($user->avatar) {{ $user->name }} @else
{{ strtoupper(substr($user->name, 0, 1)) }}
@endif
{{ $user->name }}

Member since {{ \Carbon\Carbon::parse($user->created_at)->format('F Y') }}

Your blood type is essential for matching with compatible recipients
is_donor ? 'checked' : '' }}>
You can receive notifications about blood donation opportunities
show_as_donor ? 'checked' : '' }}>
Other users can see you as a potential donor based on your location
@if(setting('google_map_enabled'))
Your Location
Your location helps us match you with nearby blood requests and blood drives
@endif
Donation Statistics

Total Donations

{{ $totalDonations }}

Units Donated

{{ $totalUnits }}

@if($totalDonations > 0 && $user->last_donation_date)
{{ $isEligible ? 'Eligible to donate' : 'Not eligible to donate' }}

Last donation: {{ \Carbon\Carbon::parse($user->last_donation_date)->format('F d, Y') }}

@if(!$isEligible && $nextEligibleDate)

Next eligible date: {{ $nextEligibleDate->format('F d, Y') }}

@php $totalDays = 56; // 8 weeks waiting period $daysElapsed = min($totalDays, $user->days_since_last_donation); $progressPercentage = ($daysElapsed / $totalDays) * 100; @endphp

{{ $daysElapsed }} of {{ $totalDays }} days passed

@endif @else
You haven't made any blood donations yet
@endif
Blood Type Compatibility
@if($user->blood_type)
Your Blood Type Can Donate To Can Receive From
{{ $user->blood_type }} @php $canDonateTo = []; switch($user->blood_type) { case 'O-': $canDonateTo = ['O-', 'O+', 'A-', 'A+', 'B-', 'B+', 'AB-', 'AB+']; break; case 'O+': $canDonateTo = ['O+', 'A+', 'B+', 'AB+']; break; case 'A-': $canDonateTo = ['A-', 'A+', 'AB-', 'AB+']; break; case 'A+': $canDonateTo = ['A+', 'AB+']; break; case 'B-': $canDonateTo = ['B-', 'B+', 'AB-', 'AB+']; break; case 'B+': $canDonateTo = ['B+', 'AB+']; break; case 'AB-': $canDonateTo = ['AB-', 'AB+']; break; case 'AB+': $canDonateTo = ['AB+']; break; } $canReceiveFrom = []; switch($user->blood_type) { case 'O-': $canReceiveFrom = ['O-']; break; case 'O+': $canReceiveFrom = ['O-', 'O+']; break; case 'A-': $canReceiveFrom = ['O-', 'A-']; break; case 'A+': $canReceiveFrom = ['O-', 'O+', 'A-', 'A+']; break; case 'B-': $canReceiveFrom = ['O-', 'B-']; break; case 'B+': $canReceiveFrom = ['O-', 'O+', 'B-', 'B+']; break; case 'AB-': $canReceiveFrom = ['O-', 'A-', 'B-', 'AB-']; break; case 'AB+': $canReceiveFrom = ['O-', 'O+', 'A-', 'A+', 'B-', 'B+', 'AB-', 'AB+']; break; } @endphp @foreach($canDonateTo as $type) {{ $type }} @endforeach @foreach($canReceiveFrom as $type) {{ $type }} @endforeach
@else
Please set your blood type to see compatibility information
@endif
Upcoming Donations
@if(count($upcomingDonations) > 0)
@foreach($upcomingDonations as $donation) @endforeach
Blood Bank/Hospital Donation Date Blood Type Units For Request Actions
{{ $donation->bloodBank ? $donation->bloodBank->name : 'Unknown Blood Bank' }} {{ \Carbon\Carbon::parse($donation->donation_date)->format('M d, Y') }} {{ $donation->blood_type }} {{ $donation->units }} @if($donation->request) {{ Str::limit($donation->request->reason ?: 'Blood Request', 30) }} @else General @endif
@else

No upcoming donations scheduled

Schedule a Donation
@endif
Donation History
@if(count($donationHistory) > 0)
@foreach($donationHistory as $donation) @endforeach
Date Blood Bank/Hospital Blood Type Units For Request Status
{{ \Carbon\Carbon::parse($donation->donation_date)->format('M d, Y') }} {{ $donation->bloodBank ? $donation->bloodBank->name : 'Unknown Blood Bank' }} {{ $donation->blood_type }} {{ $donation->units }} @if($donation->request) {{ Str::limit($donation->request->reason ?: 'Blood Request', 30) }} @else General @endif {{ ucfirst($donation->status) }}
{{ $donationHistory->links('pagination::bootstrap-5') }}
@else

No donation history found

@endif
@endsection @section('extra-js') @if(setting('google_map_enabled')) @endif @endsection