File size: 13,074 Bytes
884905d 5ab5bbf 884905d 5ab5bbf 884905d 5ab5bbf 884905d 5ab5bbf 884905d 5ab5bbf 884905d 5ab5bbf 884905d | 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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard | BHBM</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.brand-gradient {
background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
}
.sidebar {
width: 280px;
transition: all 0.3s;
}
.main-content {
margin-left: 280px;
transition: all 0.3s;
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
position: absolute;
z-index: 10;
}
.sidebar.active {
transform: translateX(0);
}
.main-content {
margin-left: 0;
}
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex">
<!-- Sidebar -->
<div class="sidebar fixed h-full bg-gray-800 text-white shadow-lg">
<div class="p-4 brand-gradient">
<div class="flex items-center space-x-2">
<i data-feather="printer" class="w-8 h-8"></i>
<span class="text-xl font-bold">BHBM Admin</span>
</div>
</div>
<nav class="p-4">
<ul class="space-y-2">
<li>
<a href="#" class="flex items-center space-x-2 px-4 py-2 hover:scale-105 transition transform" style="background-color: #FF8C00; clip-path: ellipse(50% 60% at 50% 50%);">
<i data-feather="home" class="w-5 h-5"></i>
<span>Dashboard</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-2 px-4 py-2 hover:scale-105 transition transform" style="background-color: #FF4500; clip-path: ellipse(50% 60% at 50% 50%);">
<i data-feather="list" class="w-5 h-5"></i>
<span>Service Requests</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-2 px-4 py-2 hover:scale-105 transition transform" style="background-color: #006400; clip-path: ellipse(50% 60% at 50% 50%);">
<i data-feather="users" class="w-5 h-5"></i>
<span>Customers</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-2 px-4 py-2 hover:scale-105 transition transform" style="background-color: #00008B; clip-path: ellipse(50% 60% at 50% 50%);">
<i data-feather="settings" class="w-5 h-5"></i>
<span>Settings</span>
</a>
</li>
<li>
<a href="index.html" class="flex items-center space-x-2 px-4 py-2 hover:scale-105 transition transform" style="background-color: #4B0082; clip-path: ellipse(50% 60% at 50% 50%);">
<i data-feather="globe" class="w-5 h-5"></i>
<span>Back to Website</span>
</a>
</li>
</ul>
</nav>
</div>
<!-- Main Content -->
<div class="main-content flex-1 min-h-screen">
<!-- Top Navigation -->
<header class="bg-white shadow-sm">
<div class="flex justify-between items-center p-4">
<button class="md:hidden">
<i data-feather="menu" class="w-6 h-6"></i>
</button>
<div class="flex items-center space-x-4">
<div class="relative">
<i data-feather="bell" class="w-5 h-5"></i>
<span class="absolute -top-1 -right-1 w-2 h-2 bg-red-500 rounded-full"></span>
</div>
<div class="flex items-center space-x-2">
<img src="http://static.photos/people/40x40/1" alt="Admin" class="w-8 h-8 rounded-full">
<span class="font-medium">Admin</span>
</div>
</div>
</div>
</header>
<!-- Dashboard Content -->
<main class="p-6">
<h1 class="text-2xl font-bold mb-6">Dashboard Overview</h1>
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500">Pending Requests</p>
<h3 class="text-2xl font-bold mt-2">12</h3>
</div>
<i data-feather="clock" class="w-8 h-8 text-blue-500"></i>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500">Active Customers</p>
<h3 class="text-2xl font-bold mt-2">47</h3>
</div>
<i data-feather="users" class="w-8 h-8 text-green-500"></i>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500">Monthly Revenue</p>
<h3 class="text-2xl font-bold mt-2">$8,420</h3>
</div>
<i data-feather="dollar-sign" class="w-8 h-8 text-purple-500"></i>
</div>
</div>
</div>
<!-- Recent Requests -->
<div class="bg-white p-6 rounded-lg shadow mb-8">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-semibold">Recent Service Requests</h2>
<a href="#" class="text-green-600 hover:text-green-800 text-sm">View All</a>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead>
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Customer</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Equipment</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Issue</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</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">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/40x40/2" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">John Smith</div>
<div class="text-sm text-gray-500">Acme Corp</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">Printer</div>
<div class="text-sm text-gray-500">HP LaserJet Pro</div>
</td>
<td class="px-6 py-4">
<div class="text-sm text-gray-900">Paper jams frequently</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Today</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Pending</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-green-600 hover:text-green-900 mr-3">View</a>
<a href="#" class="text-blue-600 hover:text-blue-900">Assign</a>
</td>
</tr>
<!-- More rows would be here -->
</tbody>
</table>
</div>
</div>
<!-- Equipment Stats -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="bg-white p-6 rounded-lg shadow">
<h2 class="text-xl font-semibold mb-4">Equipment Breakdown</h2>
<canvas id="equipmentChart" height="250"></canvas>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<h2 class="text-xl font-semibold mb-4">Status Distribution</h2>
<canvas id="statusChart" height="250"></canvas>
</div>
</div>
</main>
</div>
</div>
<script>
feather.replace();
// Mobile sidebar toggle
document.querySelector('.md\\:hidden').addEventListener('click', function() {
document.querySelector('.sidebar').classList.toggle('active');
});
// Charts
const equipmentCtx = document.getElementById('equipmentChart').getContext('2d');
const equipmentChart = new Chart(equipmentCtx, {
type: 'doughnut',
data: {
labels: ['Printers', 'Copiers', 'Fax Machines', 'Shredders', 'Other'],
datasets: [{
data: [45, 25, 15, 10, 5],
backgroundColor: [
'#4CAF50',
'#2196F3',
'#FFC107',
'#9C27B0',
'#607D8B'
]
}]
},
options: {
responsive: true,
maintainAspectRatio: false
}
});
const statusCtx = document.getElementById('statusChart').getContext('2d');
const statusChart = new Chart(statusCtx, {
type: 'bar',
data: {
labels: ['Pending', 'In Progress', 'Completed', 'Cancelled'],
datasets: [{
label: 'Service Requests',
data: [12, 8, 32, 3],
backgroundColor: [
'#FFC107',
'#2196F3',
'#4CAF50',
'#F44336'
]
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
</body>
</html> |