Spaces:
Running
Running
File size: 23,148 Bytes
970e080 7717be6 970e080 7717be6 970e080 7717be6 970e080 7717be6 970e080 52ce0b0 970e080 7717be6 970e080 e60be91 970e080 e60be91 aa29200 e60be91 f9c124e e60be91 d6b64e1 e60be91 970e080 aa29200 e60be91 970e080 46c26d2 |
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 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TimeWizard - Employee Time Tracking</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#4F46E5',
secondary: '#10B981',
dark: '#1E293B',
light: '#F8FAFC'
}
}
}
}
</script>
<style>
.auth-bg {
background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.1) 0%, rgba(255,255,255,1) 90%);
}
.dashboard-bg {
background-color: #F8FAFC;
}
.time-card {
transition: all 0.3s ease;
}
.time-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.sidebar-link.active {
border-left: 4px solid #4F46E5;
background-color: rgba(79, 70, 229, 0.1);
}
</style>
</head>
<body class="font-sans antialiased">
<!-- Authentication Page -->
<div id="auth-page" class="min-h-screen flex items-center justify-center auth-bg">
<div class="w-full max-w-md px-6 py-12 bg-white rounded-xl shadow-lg">
<div class="text-center mb-8">
<div class="w-20 h-20 bg-primary rounded-full flex items-center justify-center mx-auto mb-4">
<i data-feather="clock" class="text-white w-10 h-10"></i>
</div>
<h1 class="text-3xl font-bold text-dark mb-2">TimeWizard</h1>
<p class="text-gray-600">Manage time like magic ✨</p>
</div>
<form class="space-y-6">
<div>
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="mail" class="text-gray-400"></i>
</div>
<input id="email" name="email" type="email" required class="pl-10 w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-primary focus:border-primary">
</div>
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="lock" class="text-gray-400"></i>
</div>
<input id="password" name="password" type="password" required class="pl-10 w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-primary focus:border-primary">
</div>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded">
<label for="remember-me" class="ml-2 block text-sm text-gray-700">Remember me</label>
</div>
<div class="text-sm">
<a href="#" class="font-medium text-primary hover:text-primary-dark">Forgot password?</a>
</div>
</div>
<div>
<button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-primary hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
Sign in
</button>
</div>
</form>
<div class="mt-6">
<div class="relative">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-300"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-white text-gray-500">Or continue with</span>
</div>
</div>
<div class="mt-6 grid grid-cols-2 gap-3">
<div>
<button type="button" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-lg shadow-sm bg-white text-sm font-medium text-gray-700 hover:bg-gray-50">
<i data-feather="github" class="mr-2"></i> GitHub
</button>
</div>
<div>
<button type="button" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-lg shadow-sm bg-white text-sm font-medium text-gray-700 hover:bg-gray-50">
<i data-feather="google" class="mr-2"></i> Google
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Employee Dashboard (hidden by default) -->
<div id="employee-dashboard" class="hidden min-h-screen flex">
<!-- Sidebar -->
<div class="w-64 bg-white shadow-md">
<div class="p-6 flex items-center space-x-3">
<div class="w-10 h-10 bg-primary rounded-full flex items-center justify-center">
<i data-feather="user" class="text-white w-5 h-5"></i>
</div>
<div>
<p class="font-medium text-dark">John Doe</p>
<p class="text-xs text-gray-500">Employee</p>
</div>
</div>
<nav class="mt-8 px-4 space-y-1">
<a href="index.html" class="sidebar-link active flex items-center px-4 py-3 text-sm font-medium text-dark rounded-lg">
<i data-feather="home" class="mr-3 text-primary"></i> Dashboard
</a>
<a href="time-tracking.html" class="sidebar-link flex items-center px-4 py-3 text-sm font-medium text-gray-600 hover:text-dark rounded-lg">
<i data-feather="clock" class="mr-3"></i> Time Tracking
</a>
<a href="vacation.html" class="sidebar-link flex items-center px-4 py-3 text-sm font-medium text-gray-600 hover:text-dark rounded-lg">
<i data-feather="calendar" class="mr-3"></i> Vacation
</a>
<a href="reports.html" class="sidebar-link flex items-center px-4 py-3 text-sm font-medium text-gray-600 hover:text-dark rounded-lg">
<i data-feather="file-text" class="mr-3"></i> Reports
</a>
<a href="settings.html" class="sidebar-link flex items-center px-4 py-3 text-sm font-medium text-gray-600 hover:text-dark rounded-lg">
<i data-feather="settings" class="mr-3"></i> Settings
</a>
</nav>
</div>
<!-- Main Content -->
<div class="flex-1 dashboard-bg p-8">
<div class="flex justify-between items-center mb-8">
<h1 class="text-2xl font-bold text-dark">Dashboard</h1>
<div class="flex items-center space-x-4">
<button class="p-2 rounded-full bg-white shadow hover:bg-gray-50">
<i data-feather="bell"></i>
</button>
<button class="p-2 rounded-full bg-white shadow hover:bg-gray-50">
<i data-feather="help-circle"></i>
</button>
</div>
</div>
<!-- Time Tracking Card -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-xl shadow-md p-6 time-card">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-medium text-dark">Today's Time</h2>
<div class="bg-primary bg-opacity-10 p-2 rounded-full">
<i data-feather="clock" class="text-primary w-5 h-5"></i>
</div>
</div>
<div class="text-center py-4">
<p class="text-4xl font-bold text-dark mb-2">7:24</p>
<p class="text-sm text-gray-500">Total hours worked</p>
</div>
<div class="flex justify-between mt-4">
<button class="flex-1 mr-2 bg-primary text-white py-2 px-4 rounded-lg text-sm font-medium hover:bg-primary-dark">
Clock In
</button>
<button class="flex-1 bg-gray-200 text-gray-700 py-2 px-4 rounded-lg text-sm font-medium hover:bg-gray-300">
Clock Out
</button>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 time-card">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-medium text-dark">Break Time</h2>
<div class="bg-secondary bg-opacity-10 p-2 rounded-full">
<i data-feather="coffee" class="text-secondary w-5 h-5"></i>
</div>
</div>
<div class="text-center py-4">
<p class="text-4xl font-bold text-dark mb-2">0:45</p>
<p class="text-sm text-gray-500">Total break time today</p>
</div>
<div class="flex justify-between mt-4">
<button class="flex-1 mr-2 bg-secondary text-white py-2 px-4 rounded-lg text-sm font-medium hover:bg-secondary-dark">
Start Break
</button>
<button class="flex-1 bg-gray-200 text-gray-700 py-2 px-4 rounded-lg text-sm font-medium hover:bg-gray-300">
End Break
</button>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 time-card">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-medium text-dark">Vacation Days</h2>
<div class="bg-yellow-400 bg-opacity-10 p-2 rounded-full">
<i data-feather="sun" class="text-yellow-400 w-5 h-5"></i>
</div>
</div>
<div class="text-center py-4">
<p class="text-4xl font-bold text-dark mb-2">12/20</p>
<p class="text-sm text-gray-500">Days remaining this year</p>
</div>
<button class="w-full mt-4 bg-yellow-400 text-white py-2 px-4 rounded-lg text-sm font-medium hover:bg-yellow-500">
Request Vacation
</button>
</div>
</div>
<!-- Recent Activity -->
<div class="bg-white rounded-xl shadow-md p-6 mb-8">
<div class="flex items-center justify-between mb-6">
<h2 class="text-lg font-medium text-dark">Recent Activity</h2>
<button class="text-sm text-primary font-medium hover:text-primary-dark">View All</button>
</div>
<div class="space-y-4">
<div class="flex items-start pb-4 border-b border-gray-100">
<div class="bg-primary bg-opacity-10 p-2 rounded-full mr-4">
<i data-feather="clock" class="text-primary w-5 h-5"></i>
</div>
<div class="flex-1">
<p class="text-sm font-medium text-dark">You clocked in at 9:00 AM</p>
<p class="text-xs text-gray-500">Today, 9:00 AM</p>
</div>
</div>
<div class="flex items-start pb-4 border-b border-gray-100">
<div class="bg-secondary bg-opacity-10 p-2 rounded-full mr-4">
<i data-feather="coffee" class="text-secondary w-5 h-5"></i>
</div>
<div class="flex-1">
<p class="text-sm font-medium text-dark">Break started at 12:30 PM</p>
<p class="text-xs text-gray-500">Today, 12:30 PM</p>
</div>
</div>
<div class="flex items-start pb-4 border-b border-gray-100">
<div class="bg-secondary bg-opacity-10 p-2 rounded-full mr-4">
<i data-feather="coffee" class="text-secondary w-5 h-5"></i>
</div>
<div class="flex-1">
<p class="text-sm font-medium text-dark">Break ended at 1:15 PM</p>
<p class="text-xs text-gray-500">Today, 1:15 PM</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-green-500 bg-opacity-10 p-2 rounded-full mr-4">
<i data-feather="check" class="text-green-500 w-5 h-5"></i>
</div>
<div class="flex-1">
<p class="text-sm font-medium text-dark">Your vacation request for July 15-20 was approved</p>
<p class="text-xs text-gray-500">Yesterday, 3:45 PM</p>
</div>
</div>
</div>
</div>
<!-- Weekly Summary -->
<div class="bg-white rounded-xl shadow-md p-6">
<div class="flex items-center justify-between mb-6">
<h2 class="text-lg font-medium text-dark">Weekly Summary</h2>
<button class="text-sm text-primary font-medium hover:text-primary-dark">Export</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Clock In</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Clock Out</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total Hours</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Break Time</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">Mon, Jun 12</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">9:00 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5:30 PM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8.5</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">0:45</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">Complete</span>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">Tue, Jun 13</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8:45 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5:15 PM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8.5</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1:00</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">Complete</span>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">Wed, Jun 14</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">9:15 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5:45 PM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8.5</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">0:45</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">Complete</span>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">Thu, Jun 15</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">9:00 AM</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">-</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">-</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">-</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">In Progress</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Admin Dashboard (hidden by default) -->
<div id="admin-dashboard" class="hidden min-h-screen flex">
<!-- Admin content would go here -->
</div>
<script>
feather.replace();
// Sample users database (in a real app, this would be server-side)
const users = [
{ email: 'admin@example.com', password: 'admin123', role: 'admin', name: 'Admin User' },
{ email: 'employee@example.com', password: 'employee123', role: 'employee', name: 'John Doe' }
];
document.querySelector('form').addEventListener('submit', function(e) {
e.preventDefault();
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
// Find user
const user = users.find(u => u.email === email && u.password === password);
if (user) {
// Hide auth page
document.getElementById('auth-page').classList.add('hidden');
// Show appropriate dashboard
if (user.role === 'admin') {
window.location.href = "admin-dashboard.html";
} else {
// Redirect to dashboard page by default
window.location.href = "index.html";
}
} else {
alert('Invalid email or password');
}
});
// Time tracking demo functionality
if (document.getElementById('employee-dashboard')) {
const clockInBtn = document.querySelector('#employee-dashboard button:first-child');
const clockOutBtn = document.querySelector('#employee-dashboard button:nth-child(2)');
const breakStartBtn = document.querySelector('#employee-dashboard button:nth-child(3)');
const breakEndBtn = document.querySelector('#employee-dashboard button:nth-child(4)');
clockInBtn.addEventListener('click', function() {
alert('Clocked in at ' + new Date().toLocaleTimeString());
clockInBtn.disabled = true;
clockOutBtn.disabled = false;
});
clockOutBtn.addEventListener('click', function() {
alert('Clocked out at ' + new Date().toLocaleTimeString());
clockOutBtn.disabled = true;
clockInBtn.disabled = false;
});
breakStartBtn.addEventListener('click', function() {
alert('Break started at ' + new Date().toLocaleTimeString());
breakStartBtn.disabled = true;
breakEndBtn.disabled = false;
});
breakEndBtn.addEventListener('click', function() {
alert('Break ended at ' + new Date().toLocaleTimeString());
breakEndBtn.disabled = true;
breakStartBtn.disabled = false;
});
}
</script>
</body>
</html>
|