File size: 8,393 Bytes
06f4684 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Management | Lumikiza</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gray-50">
<admin-sidebar></admin-sidebar>
<custom-navbar></custom-navbar>
<main class="ml-80 py-12">
<div class="container mx-auto px-4">
<h1 class="text-3xl font-bold text-gray-900 mb-8">User Management</h1>
<!-- Search and Filters -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<div class="flex flex-col md:flex-row gap-4 items-center justify-between">
<div class="flex-1">
<input type="text" placeholder="Search users by name, email, or business..." class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
</div>
<div class="flex gap-2">
<select class="px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<option value="">All Roles</option>
<option value="founder">Founder</option>
<option value="advisor">Advisor</option>
</select>
<select class="px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<option value="">All Status</option>
<option value="pending">Pending</option>
<option value="active">Active</option>
<option value="suspended">Suspended</option>
</select>
</div>
</div>
</div>
<!-- Users Table -->
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
<table class="w-full">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
User
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Role
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Status
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Registration Date
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Actions
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<img src="http://static.photos/people/200x200/1" alt="User" class="w-10 h-10 rounded-full mr-4">
<div>
<div class="text-sm font-medium text-gray-900">Musonda Chisha</div>
<div class="text-sm text-gray-500">musonda@agritech.co.zm</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Founder</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full">Founder</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Active</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="text-sm text-gray-900">2025-01-15</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<button class="text-blue-600 hover:text-blue-900 mr-3">Edit</button>
<button class="text-red-600 hover:text-red-900">Suspend</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<img src="http://static.photos/people/200x200/2" alt="User" class="w-10 h-10 rounded-full mr-4">
<div>
<div class="text-sm font-medium text-gray-900">Dr. James Mwansa</div>
<div class="text-sm text-gray-500">james@techadvisor.zm</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full">Advisor</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">Advisor</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="text-sm text-gray-900">2025-01-18</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="text-sm text-gray-900">2025-01-18</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<button class="text-blue-600 hover:text-blue-900 mr-3">Edit</button>
<button class="text-red-600 hover:text-red-900">Suspend</button>
</td>
</tr>
</tbody>
</table>
</div>
</main>
<custom-footer></custom-footer>
<script src="components/admin-sidebar.js"></script>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="components/notification-bell.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
// Load admin data
document.addEventListener('DOMContentLoaded', function() {
const adminData = JSON.parse(localStorage.getItem('currentUser'));
if (adminData && adminData.role === 'admin') {
document.getElementById('adminName').textContent = adminData.fullName || 'Admin';
} else {
window.location.href = '/';
}
});
</script>
</body>
</html> |