{% extends 'base.html' %} {% load static %} {% block title %}User Profile - RaktaPulse{% endblock %} {% block content %}
{% if user.profile.profile_pic %} {{ user.username }} {% else %}
{% endif %}

{{ user.username }}

Member since {{ user.date_joined|date:"M d, Y" }}

{% csrf_token %}
Account Information
{{ u_form.first_name }}
{{ u_form.last_name }}
Profile Details
{{ p_form.bio }}
Write a short bio about yourself.
{{ p_form.blood_group }}
{{ p_form.phone }}
{{ p_form.birth_date }}
{{ p_form.location }}
{{ p_form.profile_pic }}
Transaction & Operation History
Donor Record (People You've Helped)
{{ donations_made.count }}
Total Volunteers
{{ completed_donations_count }}
Successful Donations
{% if donations_made %}
{% for donation in donations_made %}
Helped {{ donation.request.patient_name }}
{{ donation.request.hospital }} | {{ donation.date|date:"M d, Y" }}
{% if donation.is_completed %} Completed {% else %} Pending {% endif %}
{% endfor %}
{% else %}

You haven't volunteered for any requests yet.

{% endif %}
Request History (Who Helped You)
{% if requests_made %}
{% for br in requests_made %}
{{ br.blood_group }} for {{ br.patient_name }}
{{ br.created_at|date:"M d, Y" }} | Status: {{ br.status }}

Volunteers:

{% with br.donations.all as donations %} {% if donations %}
{% for d in donations %} {{ d.donor_user.username }} {% endfor %}
{% else %} No volunteers yet {% endif %} {% endwith %}
{{ br.status }}
{% endfor %}
{% else %}

You haven't made any blood requests yet.

{% endif %}
Danger Zone

Clearing personal info will remove your bio, location, phone number, and profile picture. Your account and donation history will remain intact.

{% csrf_token %}
{% csrf_token %}
{% endblock %}