slived1001's picture
create queing system using react vite frontend and springboot maven backend mysql as database
6fad4cf verified
Raw
History Blame Contribute Delete
29.5 kB
<!DOCTYPE html>
<html lang="en" class="h-full dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QueueFlow Admin Dashboard</title>
<link rel="icon" type="image/x-icon" href="/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: {
100: '#e0f2fe',
500: '#0ea5e9',
900: '#0369a1',
},
secondary: {
100: '#f0fdf4',
500: '#22c55e',
900: '#166534',
}
}
}
}
}
</script>
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar.collapsed {
width: 80px;
}
.sidebar.collapsed .sidebar-text {
display: none;
}
.sidebar.collapsed .logo-text {
display: none;
}
.sidebar.collapsed .menu-item {
justify-content: center;
}
</style>
</head>
<body class="min-h-full bg-gray-100 dark:bg-gray-900">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div id="sidebar" class="sidebar bg-white dark:bg-gray-800 shadow-lg w-64 flex flex-col">
<div class="p-6 flex items-center space-x-2">
<div class="w-10 h-10 rounded-full bg-primary-500 flex items-center justify-center">
<i data-feather="list" class="text-white"></i>
</div>
<span class="logo-text text-xl font-bold text-primary-900 dark:text-white">QueueFlow</span>
</div>
<div class="flex-1 overflow-y-auto">
<nav class="px-4 space-y-1">
<div class="mb-4 px-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider sidebar-text">Main</div>
<a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium rounded-lg bg-primary-50 text-primary-700 dark:bg-gray-700 dark:text-white">
<i data-feather="home" class="w-5 h-5"></i>
<span class="sidebar-text ml-3">Dashboard</span>
</a>
<a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700">
<i data-feather="users" class="w-5 h-5"></i>
<span class="sidebar-text ml-3">Queues</span>
<span class="sidebar-text ml-auto px-2 py-0.5 text-xs font-medium bg-primary-500 text-white rounded-full">5</span>
</a>
<a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700">
<i data-feather="calendar" class="w-5 h-5"></i>
<span class="sidebar-text ml-3">Schedules</span>
</a>
<a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700">
<i data-feather="bell" class="w-5 h-5"></i>
<span class="sidebar-text ml-3">Notifications</span>
</a>
<div class="mb-4 px-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider sidebar-text mt-8">Management</div>
<a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700">
<i data-feather="settings" class="w-5 h-5"></i>
<span class="sidebar-text ml-3">Settings</span>
</a>
<a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700">
<i data-feather="user" class="w-5 h-5"></i>
<span class="sidebar-text ml-3">Users</span>
</a>
<a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700">
<i data-feather="bar-chart-2" class="w-5 h-5"></i>
<span class="sidebar-text ml-3">Reports</span>
</a>
<a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700">
<i data-feather="help-circle" class="w-5 h-5"></i>
<span class="sidebar-text ml-3">Help</span>
</a>
</nav>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700">
<div class="flex items-center">
<div class="flex-shrink-0">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/1" alt="User profile">
</div>
<div class="ml-3 sidebar-text">
<p class="text-sm font-medium text-gray-900 dark:text-white">Admin User</p>
<p class="text-xs text-gray-500 dark:text-gray-400">admin@queueflow.com</p>
</div>
<button id="sidebar-toggle" class="ml-auto text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
<i data-feather="chevron-left"></i>
</button>
</div>
</div>
</div>
<!-- Main content -->
<div class="flex-1 overflow-auto">
<!-- Top navigation -->
<header class="bg-white dark:bg-gray-800 shadow-sm">
<div class="px-6 py-4 flex items-center justify-between">
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">Queue Dashboard</h1>
<div class="flex items-center space-x-4">
<div class="relative">
<i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
<input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent">
</div>
<button class="p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 relative">
<i data-feather="bell" class="text-gray-700 dark:text-gray-300"></i>
<span class="absolute top-0 right-0 w-2 h-2 bg-primary-500 rounded-full"></span>
</button>
<button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700">
<i data-feather="sun" class="text-gray-700 dark:text-gray-300"></i>
</button>
</div>
</div>
</header>
<!-- Main content area -->
<main class="p-6">
<!-- Stats cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="bg-white dark:bg-gray-800 rounded-xl shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-lg bg-primary-100 dark:bg-gray-700 mr-4">
<i data-feather="users" class="text-primary-500"></i>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Total Queues</p>
<h3 class="text-2xl font-bold text-gray-900 dark:text-white">5</h3>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-xl shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-lg bg-green-100 dark:bg-gray-700 mr-4">
<i data-feather="user-check" class="text-green-500"></i>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Active Customers</p>
<h3 class="text-2xl font-bold text-gray-900 dark:text-white">24</h3>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-xl shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-lg bg-yellow-100 dark:bg-gray-700 mr-4">
<i data-feather="clock" class="text-yellow-500"></i>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Avg. Wait Time</p>
<h3 class="text-2xl font-bold text-gray-900 dark:text-white">8.5 min</h3>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-xl shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-lg bg-red-100 dark:bg-gray-700 mr-4">
<i data-feather="activity" class="text-red-500"></i>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Today's Capacity</p>
<h3 class="text-2xl font-bold text-gray-900 dark:text-white">72%</h3>
</div>
</div>
</div>
</div>
<!-- Active queues -->
<div class="bg-white dark:bg-gray-800 rounded-xl shadow mb-8">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between">
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">Active Queues</h2>
<button class="px-4 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg text-sm font-medium flex items-center">
<i data-feather="plus" class="w-4 h-4 mr-2"></i>
Add Queue
</button>
</div>
<div class="divide-y divide-gray-200 dark:divide-gray-700">
<div class="p-6">
<div class="flex items-start justify-between">
<div>
<h3 class="text-lg font-medium text-gray-900 dark:text-white">Customer Service</h3>
<p class="text-sm text-gray-500 dark:text-gray-400 mt-1">Main service desk for customer inquiries</p>
</div>
<div class="flex items-center space-x-4">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200">
Active
</span>
<button class="text-gray-400 hover:text-gray-500 dark:hover:text-gray-300">
<i data-feather="more-vertical" class="w-5 h-5"></i>
</button>
</div>
</div>
<div class="mt-4">
<div class="flex justify-between items-center mb-4">
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Current position being served</p>
<p class="text-xl font-semibold text-gray-900 dark:text-white">#12</p>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Next available</p>
<p class="text-xl font-semibold text-gray-900 dark:text-white">#13</p>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Wait time</p>
<p class="text-xl font-semibold text-gray-900 dark:text-white">~5 min</p>
</div>
</div>
<div class="relative pt-1">
<div class="flex mb-2 items-center justify-between">
<div>
<span class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded-full text-primary-700 bg-primary-200 dark:text-primary-100 dark:bg-primary-900">
Progress
</span>
</div>
<div class="text-right">
<span class="text-xs font-semibold inline-block text-primary-700 dark:text-primary-300">
65%
</span>
</div>
</div>
<div class="overflow-hidden h-2 mb-4 text-xs flex rounded bg-primary-200 dark:bg-gray-700">
<div style="width: 65%" class="shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-primary-500"></div>
</div>
</div>
</div>
</div>
<div class="p-6">
<div class="flex items-start justify-between">
<div>
<h3 class="text-lg font-medium text-gray-900 dark:text-white">Technical Support</h3>
<p class="text-sm text-gray-500 dark:text-gray-400 mt-1">IT help desk for technical issues</p>
</div>
<div class="flex items-center space-x-4">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200">
Busy
</span>
<button class="text-gray-400 hover:text-gray-500 dark:hover:text-gray-300">
<i data-feather="more-vertical" class="w-5 h-5"></i>
</button>
</div>
</div>
<div class="mt-4">
<div class="flex justify-between items-center mb-4">
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Current position being served</p>
<p class="text-xl font-semibold text-gray-900 dark:text-white">#7</p>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Next available</p>
<p class="text-xl font-semibold text-gray-900 dark:text-white">#8</p>
</div>
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">Wait time</p>
<p class="text-xl font-semibold text-gray-900 dark:text-white">~15 min</p>
</div>
</div>
<div class="relative pt-1">
<div class="flex mb-2 items-center justify-between">
<div>
<span class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded-full text-yellow-700 bg-yellow-200 dark:text-yellow-100 dark:bg-yellow-900">
Progress
</span>
</div>
<div class="text-right">
<span class="text-xs font-semibold inline-block text-yellow-700 dark:text-yellow-300">
35%
</span>
</div>
</div>
<div class="overflow-hidden h-2 mb-4 text-xs flex rounded bg-yellow-200 dark:bg-gray-700">
<div style="width: 35%" class="shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-yellow-500"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Recent activity -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<div class="lg:col-span-2 bg-white dark:bg-gray-800 rounded-xl shadow">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">Recent Activity</h2>
</div>
<div class="divide-y divide-gray-200 dark:divide-gray-700">
<div class="p-6 flex">
<div class="flex-shrink-0">
<div class="h-10 w-10 rounded-full bg-primary-100 dark:bg-gray-700 flex items-center justify-center">
<i data-feather="user-plus" class="text-primary-500"></i>
</div>
</div>
<div class="ml-4 flex-1">
<div class="flex items-center justify-between">
<p class="text-sm font-medium text-gray-900 dark:text-white">
New customer joined
</p>
<p class="text-sm text-gray-500 dark:text-gray-400">
2m ago
</p>
</div>
<p class="text-sm text-gray-500 dark:text-gray-400">
Customer #25 joined the Technical Support queue
</p>
</div>
</div>
<div class="p-6 flex">
<div class="flex-shrink-0">
<div class="h-10 w-10 rounded-full bg-green-100 dark:bg-gray-700 flex items-center justify-center">
<i data-feather="check-circle" class="text-green-500"></i>
</div>
</div>
<div class="ml-4 flex-1">
<div class="flex items-center justify-between">
<p class="text-sm font-medium text-gray-900 dark:text-white">
Customer served
</p>
<p class="text-sm text-gray-500 dark:text-gray-400">
8m ago
</p>
</div>
<p class="text-sm text-gray-500 dark:text-gray-400">
Customer #11 served from Customer Service queue
</p>
</div>
</div>
<div class="p-6 flex">
<div class="flex-shrink-0">
<div class="h-10 w-10 rounded-full bg-yellow-100 dark:bg-gray-700 flex items-center justify-center">
<i data-feather="alert-circle" class="text-yellow-500"></i>
</div>
</div>
<div class="ml-4 flex-1">
<div class="flex items-center justify-between">
<p class="text-sm font-medium text-gray-900 dark:text-white">
Queue paused
</p>
<p class="text-sm text-gray-500 dark:text-gray-400">
15m ago
</p>
</div>
<p class="text-sm text-gray-500 dark:text-gray-400">
Technical Support queue paused for lunch break
</p>
</div>
</div>
<div class="p-6 flex">
<div class="flex-shrink-0">
<div class="h-10 w-10 rounded-full bg-blue-100 dark:bg-gray-700 flex items-center justify-center">
<i data-feather="mail" class="text-blue-500"></i>
</div>
</div>
<div class="ml-4 flex-1">
<div class="flex items-center justify-between">
<p class="text-sm font-medium text-gray-900 dark:text-white">
Notification sent
</p>
<p class="text-sm text-gray-500 dark:text-gray-400">
30m ago
</p>
</div>
<p class="text-sm text-gray-500 dark:text-gray-400">
SMS notification sent to Customer #12 (next in line)
</p>
</div>
</div>
</div>
</div>
<!-- Quick actions -->
<div class="bg-white dark:bg-gray-800 rounded-xl shadow">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">Quick Actions</h2>
</div>
<div class="p-6 space-y-4">
<button class="w-full px-4 py-3 border border-gray-300 dark:border-gray-700 rounded-lg text-left flex items-center hover:bg-gray-50 dark:hover:bg-gray-700 transition">
<div class="p-2 rounded-lg bg-primary-100 dark:bg-gray-700 mr-4">
<i data-feather="plus-circle" class="text-primary-500"></i>
</div>
<span class="font-medium text-gray-900 dark:text-white">Add New Queue</span>
</button>
<button class="w-full px-4 py-3 border border-gray-300 dark:border-gray-700 rounded-lg text-left flex items-center hover:bg-gray-50 dark:hover:bg-gray-700 transition">
<div class="p-2 rounded-lg bg-green-100 dark:bg-gray-700 mr-4">
<i data-feather="user-check" class="text-green-500"></i>
</div>
<span class="font-medium text-gray-900 dark:text-white">Call Next Customer</span>
</button>
<button class="w-full px-4 py-3 border border-gray-300 dark:border-gray-700 rounded-lg text-left flex items-center hover:bg-gray-50 dark:hover:bg-gray-700 transition">
<div class="p-2 rounded-lg bg-yellow-100 dark:bg-gray-700 mr-4">
<i data-feather="pause" class="text-yellow-500"></i>
</div>
<span class="font-medium text-gray-900 dark:text-white">Pause Queue</span>
</button>
<button class="w-full px-4 py-3 border border-gray-300 dark:border-gray-700 rounded-lg text-left flex items-center hover:bg-gray-50 dark:hover:bg-gray-700 transition">
<div class="p-2 rounded-lg bg-red-100 dark:bg-gray-700 mr-4">
<i data-feather="alert-triangle" class="text-red-500"></i>
</div>
<span class="font-medium text-gray-900 dark:text-white">Emergency Stop</span>
</button>
<button class="w-full px-4 py-3 border border-gray-300 dark:border-gray-700 rounded-lg text-left flex items-center hover:bg-gray-50 dark:hover:bg-gray-700 transition">
<div class="p-2 rounded-lg bg-purple-100 dark:bg-gray-700 mr-4">
<i data-feather="settings" class="text-purple-500"></i>
</div>
<span class="font-medium text-gray-900 dark:text-white">System Settings</span>
</button>
</div>
</div>
</div>
</main>
</div>
</div>
<script>
// Toggle sidebar
const sidebar = document.getElementById('sidebar');
const sidebarToggle = document.getElementById('sidebar-toggle');
sidebarToggle.addEventListener('click', () => {
sidebar.classList.toggle('collapsed');
const icon = sidebarToggle.querySelector('i');
if (sidebar.classList.contains('collapsed')) {
icon.setAttribute('data-feather', 'chevron-right');
} else {
icon.setAttribute('data-feather', 'chevron-left');
}
feather.replace();
});
// Theme toggle
const themeToggle = document.getElementById('theme-toggle');
const html = document.documentElement;
themeToggle.addEventListener('click', () => {
html.classList.toggle('dark');
const icon = themeToggle.querySelector('i');
if (html.classList.contains('dark')) {
localStorage.setItem('theme', 'dark');
icon.setAttribute('data-feather', 'sun');
} else {
localStorage.setItem('theme', 'light');
icon.setAttribute('data-feather', 'moon');
}
feather.replace();
});
// Initialize feather icons
feather.replace();
</script>
</body>
</html>