HH/templates/accounts/onboarding/progress_detail.html
2026-02-22 08:35:53 +03:00

190 lines
9.7 KiB
HTML

{% extends "layouts/base.html" %}
{% load i18n %}
{% block title %}{% trans "Onboarding Progress Detail" %}{% endblock %}
{% block content %}
<div class="p-6 md:p-8">
<!-- Header -->
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-8">
<div>
<a href="{% url 'accounts:onboarding_dashboard' %}" class="inline-flex items-center text-navy hover:text-navy mb-2 font-medium">
<i data-lucide="arrow-left" class="w-4 h-4 mr-2"></i>
{% trans "Back to Dashboard" %}
</a>
<h1 class="text-3xl font-bold text-gray-800">
{{ account.get_full_name }}
</h1>
<p class="text-gray-500">
{{ account.email }}
</p>
</div>
<div class="flex gap-3">
<span class="inline-flex items-center bg-light text-navy px-4 py-2 rounded-xl font-medium">
<i data-lucide="mail" class="w-4 h-4 mr-2"></i>
{{ account.email }}
</span>
<span class="inline-flex items-center bg-gray-100 text-gray-600 px-4 py-2 rounded-xl font-medium">
<i data-lucide="calendar" class="w-4 h-4 mr-2"></i>
{{ account.invited_at|date:"M d, Y" }}
</span>
</div>
</div>
<!-- Progress Overview -->
<div class="bg-gradient-to-br from-light to-blue-50 rounded-2xl p-8 mb-8">
<div class="grid grid-cols-1 md:grid-cols-4 gap-6">
<div class="text-center">
<div class="text-4xl font-bold text-gray-800 mb-2">
{{ progress.overall_percentage|default:0 }}%
</div>
<div class="text-sm text-gray-600">{% trans "Overall Progress" %}</div>
<div class="w-full bg-gray-200 h-2 rounded-full mt-3 overflow-hidden">
<div class="bg-gradient-to-r from-navy to-orange-500 h-full" style="width: {{ progress.overall_percentage|default:0 }}%"></div>
</div>
</div>
<div class="text-center">
<div class="text-4xl font-bold text-gray-800 mb-2">
{{ progress.checklist_completed|default:0 }}/{{ progress.checklist_total|default:0 }}
</div>
<div class="text-sm text-gray-600">{% trans "Checklist Items" %}</div>
</div>
<div class="text-center">
<div class="text-4xl font-bold text-gray-800 mb-2">
{{ progress.content_viewed|default:0 }}/{{ progress.content_total|default:0 }}
</div>
<div class="text-sm text-gray-600">{% trans "Content Items" %}</div>
</div>
<div class="text-center">
<div class="text-4xl font-bold text-navy mb-2">
{{ progress.current_step|default:"-" }}
</div>
<div class="text-sm text-gray-600">{% trans "Current Step" %}</div>
</div>
</div>
</div>
<!-- Progress Timeline -->
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 p-8 mb-8">
<h2 class="text-xl font-bold text-gray-800 mb-6">{% trans "Onboarding Timeline" %}</h2>
<div class="space-y-6">
<!-- Step 1 -->
<div class="flex gap-4">
<div class="flex flex-col items-center">
<div class="flex items-center justify-center w-10 h-10 rounded-full {% if progress.activation_complete %}bg-gradient-to-br from-blue to-orange-500{% else %}bg-gray-200{% endif %}">
{% if progress.activation_complete %}
<i data-lucide="check" class="w-5 h-5 text-white"></i>
{% else %}
<span class="text-gray-500 font-bold">1</span>
{% endif %}
</div>
{% if not progress.checklist_complete %}<div class="w-0.5 h-16 bg-gray-200"></div>{% endif %}
</div>
<div class="flex-1 pb-6">
<div class="flex items-center justify-between mb-2">
<h3 class="font-bold text-gray-800">{% trans "Account Activation" %}</h3>
{% if progress.activation_complete %}
<span class="text-sm text-green-600 font-medium">{% trans "Completed" %}</span>
{% else %}
<span class="text-sm text-gray-500">{% trans "Pending" %}</span>
{% endif %}
</div>
<p class="text-sm text-gray-500">{% trans "Create account and set password" %}</p>
{% if progress.activation_completed_at %}
<p class="text-xs text-gray-400 mt-2">
<i data-lucide="clock" class="w-3 h-3 inline mr-1"></i>
{{ progress.activation_completed_at|date:"M d, Y H:i" }}
</p>
{% endif %}
</div>
</div>
<!-- Step 2 -->
<div class="flex gap-4">
<div class="flex flex-col items-center">
<div class="flex items-center justify-center w-10 h-10 rounded-full {% if progress.checklist_complete %}bg-gradient-to-br from-blue to-orange-500{% else %}bg-gray-200{% endif %}">
{% if progress.checklist_complete %}
<i data-lucide="check" class="w-5 h-5 text-white"></i>
{% else %}
<span class="text-gray-500 font-bold">2</span>
{% endif %}
</div>
{% if not progress.content_complete %}<div class="w-0.5 h-16 bg-gray-200"></div>{% endif %}
</div>
<div class="flex-1 pb-6">
<div class="flex items-center justify-between mb-2">
<h3 class="font-bold text-gray-800">{% trans "Onboarding Checklist" %}</h3>
{% if progress.checklist_complete %}
<span class="text-sm text-green-600 font-medium">{% trans "Completed" %}</span>
{% else %}
<span class="text-sm text-gray-500">
{{ progress.checklist_completed|default:0 }}/{{ progress.checklist_total|default:0 }}
</span>
{% endif %}
</div>
<p class="text-sm text-gray-500">{% trans "Complete required onboarding tasks" %}</p>
{% if progress.checklist_completed_at %}
<p class="text-xs text-gray-400 mt-2">
<i data-lucide="clock" class="w-3 h-3 inline mr-1"></i>
{{ progress.checklist_completed_at|date:"M d, Y H:i" }}
</p>
{% endif %}
</div>
</div>
<!-- Step 3 -->
<div class="flex gap-4">
<div class="flex flex-col items-center">
<div class="flex items-center justify-center w-10 h-10 rounded-full {% if progress.content_complete %}bg-gradient-to-br from-blue to-orange-500{% else %}bg-gray-200{% endif %}">
{% if progress.content_complete %}
<i data-lucide="check" class="w-5 h-5 text-white"></i>
{% else %}
<span class="text-gray-500 font-bold">3</span>
{% endif %}
</div>
</div>
<div class="flex-1">
<div class="flex items-center justify-between mb-2">
<h3 class="font-bold text-gray-800">{% trans "Content Review" %}</h3>
{% if progress.content_complete %}
<span class="text-sm text-green-600 font-medium">{% trans "Completed" %}</span>
{% else %}
<span class="text-sm text-gray-500">
{{ progress.content_viewed|default:0 }}/{{ progress.content_total|default:0 }}
</span>
{% endif %}
</div>
<p class="text-sm text-gray-500">{% trans "Review onboarding material" %}</p>
{% if progress.content_completed_at %}
<p class="text-xs text-gray-400 mt-2">
<i data-lucide="clock" class="w-3 h-3 inline mr-1"></i>
{{ progress.content_completed_at|date:"M d, Y H:i" }}
</p>
{% endif %}
</div>
</div>
</div>
</div>
<!-- Actions -->
<div class="flex gap-4">
<a href="{% url 'accounts:onboarding_resend' account.pk %}" class="inline-flex items-center bg-blue-500 text-white px-6 py-3 rounded-xl font-bold hover:bg-blue-600 transition">
<i data-lucide="mail" class="w-5 h-5 mr-2"></i>
{% trans "Resend Invitation" %}
</a>
{% if not progress.activation_complete %}
<a href="{% url 'accounts:onboarding_activate' account.pk %}" class="inline-flex items-center bg-gradient-to-r from-navy to-orange-500 text-white px-6 py-3 rounded-xl font-bold hover:from-navy hover:to-orange-600 transition">
<i data-lucide="user-plus" class="w-5 h-5 mr-2"></i>
{% trans "Activate Account" %}
</a>
{% endif %}
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
lucide.createIcons();
});
</script>
{% endblock %}