122 lines
6.4 KiB
HTML
122 lines
6.4 KiB
HTML
{% extends "layouts/base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{% trans "Provisional Accounts" %}{% 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">
|
|
{% trans "Provisional Accounts" %}
|
|
</h1>
|
|
<p class="text-gray-500">
|
|
{% trans "View accounts pending activation" %}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Accounts List -->
|
|
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden">
|
|
{% if provisional_accounts %}
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-6 py-4 text-left text-xs font-bold text-gray-500 uppercase tracking-wider">
|
|
{% trans "Name" %}
|
|
</th>
|
|
<th class="px-6 py-4 text-left text-xs font-bold text-gray-500 uppercase tracking-wider">
|
|
{% trans "Email" %}
|
|
</th>
|
|
<th class="px-6 py-4 text-left text-xs font-bold text-gray-500 uppercase tracking-wider">
|
|
{% trans "Department" %}
|
|
</th>
|
|
<th class="px-6 py-4 text-left text-xs font-bold text-gray-500 uppercase tracking-wider">
|
|
{% trans "Invited" %}
|
|
</th>
|
|
<th class="px-6 py-4 text-left text-xs font-bold text-gray-500 uppercase tracking-wider">
|
|
{% trans "Status" %}
|
|
</th>
|
|
<th class="px-6 py-4 text-left text-xs font-bold text-gray-500 uppercase tracking-wider">
|
|
{% trans "Actions" %}
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100">
|
|
{% for account in provisional_accounts %}
|
|
<tr class="hover:bg-gray-50 transition">
|
|
<td class="px-6 py-4">
|
|
<div class="flex items-center gap-3">
|
|
<div class="flex items-center justify-center w-10 h-10 bg-light rounded-full">
|
|
<span class="text-navy font-bold text-sm">{{ account.first_name|first }}{{ account.last_name|first }}</span>
|
|
</div>
|
|
<div>
|
|
<div class="font-medium text-gray-800">{{ account.get_full_name }}</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td class="px-6 py-4">
|
|
<div class="text-gray-600">{{ account.email }}</div>
|
|
</td>
|
|
<td class="px-6 py-4">
|
|
<span class="text-gray-600">{{ account.department|default:"-" }}</span>
|
|
</td>
|
|
<td class="px-6 py-4">
|
|
<span class="text-gray-500 text-sm">{{ account.invited_at|date:"M d, Y" }}</span>
|
|
</td>
|
|
<td class="px-6 py-4">
|
|
{% if account.is_active %}
|
|
<span class="bg-green-100 text-green-600 text-xs font-bold px-3 py-1 rounded-full">Active</span>
|
|
{% elif account.activation_expires %}
|
|
{% if account.activation_expires < now %}
|
|
<span class="bg-red-100 text-red-600 text-xs font-bold px-3 py-1 rounded-full">Expired</span>
|
|
{% else %}
|
|
<span class="bg-orange-100 text-orange-600 text-xs font-bold px-3 py-1 rounded-full">Pending</span>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="bg-gray-100 text-gray-500 text-xs font-bold px-3 py-1 rounded-full">Inactive</span>
|
|
{% endif %}
|
|
</td>
|
|
<td class="px-6 py-4">
|
|
<div class="flex items-center gap-2">
|
|
<a href="{% url 'accounts:onboarding_resend' account.pk %}" class="p-2 text-gray-400 hover:bg-blue-50 hover:text-blue-500 rounded-lg transition" title="Resend invitation">
|
|
<i data-lucide="mail" class="w-5 h-5"></i>
|
|
</a>
|
|
<a href="{% url 'accounts:onboarding_delete' account.pk %}" class="p-2 text-gray-400 hover:bg-red-50 hover:text-red-500 rounded-lg transition" title="Delete account">
|
|
<i data-lucide="trash-2" class="w-5 h-5"></i>
|
|
</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="p-12 text-center">
|
|
<div class="inline-flex items-center justify-center w-16 h-16 bg-gray-100 rounded-full mb-4">
|
|
<i data-lucide="users" class="w-8 h-8 text-gray-400"></i>
|
|
</div>
|
|
<h3 class="text-lg font-bold text-gray-700 mb-2">{% trans "No Provisional Accounts" %}</h3>
|
|
<p class="text-gray-500 mb-4">{% trans "There are no accounts pending activation" %}</p>
|
|
<a href="{% url 'accounts:onboarding_bulk_invite' %}" class="inline-flex items-center bg-light0 text-white px-6 py-3 rounded-xl font-bold hover:bg-navy transition">
|
|
<i data-lucide="mail-plus" class="w-5 h-5 mr-2"></i>
|
|
{% trans "Send Invitations" %}
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
lucide.createIcons();
|
|
});
|
|
</script>
|
|
{% endblock %} |