Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>TimeWizard - Vacation Management</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> | |
| <style> | |
| .dashboard-bg { | |
| background-color: #F8FAFC; | |
| } | |
| .vacation-card { | |
| transition: all 0.3s ease; | |
| } | |
| .vacation-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); | |
| } | |
| .calendar-day { | |
| transition: all 0.2s ease; | |
| } | |
| .calendar-day:hover { | |
| background-color: rgba(79, 70, 229, 0.1); | |
| } | |
| .selected-day { | |
| background-color: rgba(79, 70, 229, 0.2); | |
| border: 1px solid #4F46E5; | |
| } | |
| </style> | |
| </head> | |
| <body class="font-sans antialiased"> | |
| <!-- Employee Dashboard --> | |
| <div class="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 flex items-center px-4 py-3 text-sm font-medium text-gray-600 hover:text-dark rounded-lg"> | |
| <i data-feather="home" class="mr-3"></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 active flex items-center px-4 py-3 text-sm font-medium text-dark rounded-lg"> | |
| <i data-feather="calendar" class="mr-3 text-primary"></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">Vacation Management</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> | |
| <!-- Vacation Summary --> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"> | |
| <div class="bg-white rounded-xl shadow-md p-6 vacation-card"> | |
| <div class="flex items-center"> | |
| <div class="bg-primary bg-opacity-10 p-3 rounded-full mr-4"> | |
| <i data-feather="sun" class="text-primary w-6 h-6"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm text-gray-500">Total Vacation Days</p> | |
| <p class="text-2xl font-bold text-dark">20</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6 vacation-card"> | |
| <div class="flex items-center"> | |
| <div class="bg-green-500 bg-opacity-10 p-3 rounded-full mr-4"> | |
| <i data-feather="check" class="text-green-500 w-6 h-6"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm text-gray-500">Used This Year</p> | |
| <p class="text-2xl font-bold text-dark">8</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6 vacation-card"> | |
| <div class="flex items-center"> | |
| <div class="bg-yellow-500 bg-opacity-10 p-3 rounded-full mr-4"> | |
| <i data-feather="clock" class="text-yellow-500 w-6 h-6"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm text-gray-500">Remaining</p> | |
| <p class="text-2xl font-bold text-dark">12</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Vacation Calendar and Request Form --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"> | |
| <!-- Calendar --> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-lg font-medium text-dark">June 2023</h2> | |
| <div class="flex space-x-2"> | |
| <button class="p-1 rounded-full hover:bg-gray-100"> | |
| <i data-feather="chevron-left" class="w-5 h-5"></i> | |
| </button> | |
| <button class="p-1 rounded-full hover:bg-gray-100"> | |
| <i data-feather="chevron-right" class="w-5 h-5"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-7 gap-1 text-center text-xs font-medium text-gray-500 mb-2"> | |
| <div class="py-2">Sun</div> | |
| <div class="py-2">Mon</div> | |
| <div class="py-2">Tue</div> | |
| <div class="py-2">Wed</div> | |
| <div class="py-2">Thu</div> | |
| <div class="py-2">Fri</div> | |
| <div class="py-2">Sat</div> | |
| </div> | |
| <div class="grid grid-cols-7 gap-1"> | |
| <!-- Previous month days --> | |
| <div class="h-12 calendar-day flex items-center justify-center text-gray-400">28</div> | |
| <div class="h-12 calendar-day flex items-center justify-center text-gray-400">29</div> | |
| <div class="h-12 calendar-day flex items-center justify-center text-gray-400">30</div> | |
| <div class="h-12 calendar-day flex items-center justify-center text-gray-400">31</div> | |
| <!-- Current month days --> | |
| <div class="h-12 calendar-day flex items-center justify-center">1</div> | |
| <div class="h-12 calendar-day flex items-center justify-center">2</div> | |
| <div class="h-12 calendar-day flex items-center justify-center">3</div> | |
| <!-- ... more days ... --> | |
| <div class="h-12 calendar-day flex items-center justify-center bg-green-50 text-green-700 font-medium">4</div> | |
| <div class="h-12 calendar-day flex items-center justify-center bg-green-50 text-green-700 font-medium">5</div> | |
| <div class="h-12 calendar-day flex items-center justify-center bg-green-50 text-green-700 font-medium">6</div> | |
| <div class="h-12 calendar-day flex items-center justify-center bg-green-50 text-green-700 font-medium">7</div> | |
| <div class="h-12 calendar-day flex items-center justify-center bg-green-50 text-green-700 font-medium">8</div> | |
| <div class="h-12 calendar-day flex items-center justify-center">9</div> | |
| <div class="h-12 calendar-day flex items-center justify-center">10</div> | |
| <!-- ... more days ... --> | |
| <div class="h-12 calendar-day selected-day flex items-center justify-center">15</div> | |
| <div class="h-12 calendar-day selected-day flex items-center justify-center">16</div> | |
| <div class="h-12 calendar-day selected-day flex items-center justify-center">17</div> | |
| <div class="h-12 calendar-day selected-day flex items-center justify-center">18</div> | |
| <div class="h-12 calendar-day selected-day flex items-center justify-center">19</div> | |
| <div class="h-12 calendar-day flex items-center justify-center">20</div> | |
| <div class="h-12 calendar-day flex items-center justify-center">21</div> | |
| <!-- ... more days ... --> | |
| </div> | |
| </div> | |
| <!-- Vacation Request Form --> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <h2 class="text-lg font-medium text-dark mb-4">Request Vacation</h2> | |
| <form class="space-y-4"> | |
| <div> | |
| <label for="vacation-type" class="block text-sm font-medium text-gray-700 mb-1">Vacation Type</label> | |
| <select id="vacation-type" name="vacation-type" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-primary focus:border-primary"> | |
| <option>Paid Vacation</option> | |
| <option>Unpaid Vacation</option> | |
| <option>Sick Leave</option> | |
| <option>Personal Day</option> | |
| </select> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | |
| <div> | |
| <label for="start-date" class="block text-sm font-medium text-gray-700 mb-1">Start Date</label> | |
| <div class="relative"> | |
| <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> | |
| <i data-feather="calendar" class="text-gray-400"></i> | |
| </div> | |
| <input id="start-date" name="start-date" type="date" 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="end-date" class="block text-sm font-medium text-gray-700 mb-1">End Date</label> | |
| <div class="relative"> | |
| <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> | |
| <i data-feather="calendar" class="text-gray-400"></i> | |
| </div> | |
| <input id="end-date" name="end-date" type="date" class="pl-10 w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-primary focus:border-primary"> | |
| </div> | |
| </div> | |
| </div> | |
| <div> | |
| <label for="notes" class="block text-sm font-medium text-gray-700 mb-1">Notes (Optional)</label> | |
| <textarea id="notes" name="notes" rows="3" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-primary focus:border-primary"></textarea> | |
| </div> | |
| <div class="pt-2"> | |
| <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"> | |
| Submit Request | |
| </button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| <!-- Vacation History --> | |
| <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">Vacation History</h2> | |
| <button class="text-sm text-primary font-medium hover:text-primary-dark">View All</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">Type</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date Range</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Days</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Approved By</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">Paid Vacation</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 15 - May 19</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5</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">Approved</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sarah Johnson</td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">Personal Day</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Apr 3 - Apr 3</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1</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">Approved</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Michael Brown</td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">Paid Vacation</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jul 10 - Jul 14</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5</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 text-gray-500">-</td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">Sick Leave</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Mar 8 - Mar 8</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1</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">Approved</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Emily Davis</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| // Simple calendar selection logic for demo | |
| document.querySelectorAll('.calendar-day').forEach(day => { | |
| if (!day.classList.contains('text-gray-400')) { | |
| day.addEventListener('click', function() { | |
| if (this.classList.contains('selected-day')) { | |
| this.classList.remove('selected-day'); | |
| this.classList.remove('bg-primary-100'); | |
| this.classList.remove('border-primary'); | |
| } else { | |
| this.classList.add('selected-day'); | |
| } | |
| }); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> | |