Files
Employee_records/public/dashboard.html
T
2025-12-14 13:31:29 -06:00

134 lines
8.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Employee Records - Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/pocketbase/dist/pocketbase.umd.js"></script>
</head>
<body class="bg-gray-50 min-h-screen">
<!-- Navigation Header -->
<nav class="bg-white shadow-sm border-b border-gray-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center h-auto sm:h-16 py-2 sm:py-0 gap-2 sm:gap-0">
<div class="flex items-center">
<h1 class="text-lg sm:text-xl font-bold text-gray-800">Employee Records</h1>
</div>
<div class="flex flex-col sm:flex-row items-start sm:items-center space-y-2 sm:space-y-0 sm:space-x-4 w-full sm:w-auto">
<div class="text-xs sm:text-sm text-gray-600">
<span id="userEmail">Loading...</span>
</div>
<button
id="logoutButton"
class="bg-red-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 transition w-full sm:w-auto"
>
Logout
</button>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="mb-6 sm:mb-8">
<h2 class="text-xl sm:text-2xl font-bold text-gray-800 mb-2">Welcome, <span id="userName">User</span></h2>
<p class="text-sm sm:text-base text-gray-600">Manage your employee records and reports</p>
</div>
<!-- Dashboard Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
<!-- Employee Records Card -->
<div class="bg-white rounded-lg shadow p-6 border border-gray-200">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-semibold text-gray-800">Employee Records</h3>
<div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center">
<svg class="w-6 h-6 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
</svg>
</div>
</div>
<p class="text-gray-600 text-sm mb-4">View and manage employee information</p>
<a href="/employees.html" class="text-indigo-600 hover:text-indigo-700 font-medium text-sm inline-block">
View Employees →
</a>
</div>
<!-- Employee Reports Card -->
<div class="bg-white rounded-lg shadow p-6 border border-gray-200">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-semibold text-gray-800">Employee Reports</h3>
<div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center">
<svg class="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg>
</div>
</div>
<p class="text-gray-600 text-sm mb-4">Generate and view employee reports</p>
<a href="/reports.html" class="text-green-600 hover:text-green-700 font-medium text-sm inline-block">
View Reports →
</a>
</div>
</div>
<!-- Quick Stats -->
<div class="bg-white rounded-lg shadow p-4 sm:p-6 border border-gray-200 mb-6 sm:mb-8">
<h3 class="text-base sm:text-lg font-semibold text-gray-800 mb-4">Quick Stats</h3>
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
<div class="text-center p-4 sm:p-6 bg-indigo-50 rounded-lg border border-indigo-100 hover:shadow-md transition-shadow">
<div class="text-3xl sm:text-4xl font-bold text-indigo-600 mb-2" id="totalEmployees">
<span class="inline-block animate-pulse">...</span>
</div>
<div class="text-xs sm:text-sm font-medium text-gray-700">Total Employees</div>
</div>
<div class="text-center p-4 sm:p-6 bg-green-50 rounded-lg border border-green-100 hover:shadow-md transition-shadow">
<div class="text-3xl sm:text-4xl font-bold text-green-600 mb-2" id="totalReports">
<span class="inline-block animate-pulse">...</span>
</div>
<div class="text-xs sm:text-sm font-medium text-gray-700">Reports Generated</div>
</div>
<div class="text-center p-4 sm:p-6 bg-purple-50 rounded-lg border border-purple-100 hover:shadow-md transition-shadow">
<div class="text-3xl sm:text-4xl font-bold text-purple-600 mb-2" id="activeEmployees">
<span class="inline-block animate-pulse">...</span>
</div>
<div class="text-xs sm:text-sm font-medium text-gray-700">Active Employees</div>
</div>
</div>
</div>
<!-- Quick Actions -->
<div class="bg-white rounded-lg shadow p-4 sm:p-6 border border-gray-200">
<h3 class="text-base sm:text-lg font-semibold text-gray-800 mb-4">Quick Actions</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<a href="/employees.html" class="flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 hover:border-indigo-300 transition-colors">
<div class="w-10 h-10 bg-indigo-100 rounded-lg flex items-center justify-center mr-4 flex-shrink-0">
<svg class="w-5 h-5 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
</svg>
</div>
<div class="min-w-0">
<div class="font-medium text-gray-900 text-sm sm:text-base">Add New Employee</div>
<div class="text-xs sm:text-sm text-gray-500">Create a new employee record</div>
</div>
</a>
<a href="/reports.html" class="flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 hover:border-green-300 transition-colors">
<div class="w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center mr-4 flex-shrink-0">
<svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
</svg>
</div>
<div class="min-w-0">
<div class="font-medium text-gray-900 text-sm sm:text-base">Create New Report</div>
<div class="text-xs sm:text-sm text-gray-500">Generate an employee report</div>
</div>
</a>
</div>
</div>
</main>
<script src="/js/dashboard.js"></script>
</body>
</html>