Spaces:
Running
Running
Download index.html from SIDDHANTKH/store-software: direct link, hf CLI and curl.
- Browser
- Download file 74.8 kB
-
https://huggingface.co/spaces/SIDDHANTKH/store-software/resolve/main/index.html
- Command line
-
hf download hf://spaces/SIDDHANTKH/store-software/index.html
-
curl -L -o index.html https://huggingface.co/spaces/SIDDHANTKH/store-software/resolve/main/index.html
74.8 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Inventory Management System</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar.collapsed {
width: 70px;
}
.sidebar.collapsed .nav-text {
display: none;
}
.sidebar.collapsed .logo-text {
display: none;
}
.main-content {
transition: all 0.3s ease;
}
.sidebar.collapsed + .main-content {
margin-left: 70px;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.datepicker {
z-index: 1000;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<!-- Login Container (Default View) -->
<div id="login-container" class="min-h-screen flex items-center justify-center bg-gray-100">
<div class="bg-white p-8 rounded-lg shadow-lg w-full max-w-md">
<div class="text-center mb-8">
<h1 class="text-3xl font-bold text-gray-800">Inventory Management</h1>
<p class="text-gray-600">Select your role to login</p>
</div>
<div class="grid grid-cols-2 gap-4 mb-8">
<button onclick="showLoginForm('storekeeper')" class="bg-blue-100 hover:bg-blue-200 text-blue-800 py-3 px-4 rounded-lg transition flex flex-col items-center">
<i class="fas fa-warehouse text-2xl mb-2"></i>
<span>Storekeeper</span>
</button>
<button onclick="showLoginForm('vendor')" class="bg-green-100 hover:bg-green-200 text-green-800 py-3 px-4 rounded-lg transition flex flex-col items-center">
<i class="fas fa-truck text-2xl mb-2"></i>
<span>Vendor</span>
</button>
<button onclick="showLoginForm('qualitychecker')" class="bg-purple-100 hover:bg-purple-200 text-purple-800 py-3 px-4 rounded-lg transition flex flex-col items-center">
<i class="fas fa-clipboard-check text-2xl mb-2"></i>
<span>Quality Checker</span>
</button>
<button onclick="showLoginForm('admin')" class="bg-red-100 hover:bg-red-200 text-red-800 py-3 px-4 rounded-lg transition flex flex-col items-center">
<i class="fas fa-user-shield text-2xl mb-2"></i>
<span>Admin</span>
</button>
</div>
<!-- Storekeeper Login Form -->
<div id="storekeeper-login" class="login-form hidden">
<h2 class="text-xl font-semibold mb-4 text-center text-blue-700">Storekeeper Login</h2>
<form onsubmit="login('storekeeper'); return false;">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="sk-username">Username</label>
<input type="text" id="sk-username" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="sk-password">Password</label>
<input type="password" id="sk-password" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg transition">Login</button>
</form>
<button onclick="hideLoginForms()" class="mt-4 text-blue-600 hover:text-blue-800">← Back to role selection</button>
</div>
<!-- Vendor Login Form -->
<div id="vendor-login" class="login-form hidden">
<h2 class="text-xl font-semibold mb-4 text-center text-green-700">Vendor Login</h2>
<form onsubmit="login('vendor'); return false;">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="v-id">Vendor ID</label>
<input type="text" id="v-id" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500" required>
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="v-password">Password</label>
<input type="password" id="v-password" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500" required>
</div>
<button type="submit" class="w-full bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-lg transition">Login</button>
</form>
<button onclick="hideLoginForms()" class="mt-4 text-green-600 hover:text-green-800">← Back to role selection</button>
</div>
<!-- Quality Checker Login Form -->
<div id="qualitychecker-login" class="login-form hidden">
<h2 class="text-xl font-semibold mb-4 text-center text-purple-700">Quality Checker Login</h2>
<form onsubmit="login('qualitychecker'); return false;">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="qc-username">Username</label>
<input type="text" id="qc-username" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="qc-password">Password</label>
<input type="password" id="qc-password" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<button type="submit" class="w-full bg-purple-600 hover:bg-purple-700 text-white py-2 px-4 rounded-lg transition">Login</button>
</form>
<button onclick="hideLoginForms()" class="mt-4 text-purple-600 hover:text-purple-800">← Back to role selection</button>
</div>
<!-- Admin Login Form -->
<div id="admin-login" class="login-form hidden">
<h2 class="text-xl font-semibold mb-4 text-center text-red-700">Admin Login</h2>
<form onsubmit="login('admin'); return false;">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="admin-username">Username</label>
<input type="text" id="admin-username" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500" required>
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="admin-password">Password</label>
<input type="password" id="admin-password" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500" required>
</div>
<button type="submit" class="w-full bg-red-600 hover:bg-red-700 text-white py-2 px-4 rounded-lg transition">Login</button>
</form>
<button onclick="hideLoginForms()" class="mt-4 text-red-600 hover:text-red-800">← Back to role selection</button>
</div>
</div>
</div>
<!-- Storekeeper Dashboard -->
<div id="storekeeper-dashboard" class="hidden min-h-screen flex">
<!-- Sidebar -->
<div class="sidebar bg-blue-800 text-white w-64 min-h-screen fixed">
<div class="p-4 flex items-center">
<i class="fas fa-warehouse text-2xl mr-3"></i>
<span class="logo-text font-bold text-xl">Inventory System</span>
</div>
<div class="mt-8">
<div class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center">
<i class="fas fa-tachometer-alt mr-3"></i>
<span class="nav-text">Dashboard</span>
</div>
<div onclick="showSection('add-product')" class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center">
<i class="fas fa-plus-circle mr-3"></i>
<span class="nav-text">Add Product</span>
</div>
<div onclick="showSection('link-product')" class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center">
<i class="fas fa-link mr-3"></i>
<span class="nav-text">Link Product to Vendor</span>
</div>
<div onclick="showSection('create-po')" class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center">
<i class="fas fa-file-invoice mr-3"></i>
<span class="nav-text">Create Purchase Order</span>
</div>
<div onclick="showSection('accept-goods')" class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center">
<i class="fas fa-check-circle mr-3"></i>
<span class="nav-text">Accept Goods</span>
</div>
<div onclick="showSection('create-invoice')" class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center">
<i class="fas fa-file-invoice-dollar mr-3"></i>
<span class="nav-text">Create Internal Invoice</span>
</div>
<div onclick="showSection('finalize-payments')" class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center">
<i class="fas fa-money-bill-wave mr-3"></i>
<span class="nav-text">Finalize Payments</span>
</div>
<div onclick="showSection('return-voucher')" class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center">
<i class="fas fa-exchange-alt mr-3"></i>
<span class="nav-text">Return Voucher</span>
</div>
<div onclick="logout()" class="px-4 py-2 hover:bg-blue-700 cursor-pointer flex items-center mt-4">
<i class="fas fa-sign-out-alt mr-3"></i>
<span class="nav-text">Logout</span>
</div>
</div>
</div>
<!-- Main Content -->
<div class="main-content ml-64 flex-1 p-8">
<h1 class="text-2xl font-bold text-gray-800 mb-6">Storekeeper Dashboard</h1>
<!-- Dashboard Overview -->
<div id="dashboard-overview" class="section">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4">
<i class="fas fa-exclamation-triangle text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Low Stock Alerts</h3>
<p class="text-2xl font-bold">12</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-yellow-100 text-yellow-600 mr-4">
<i class="fas fa-tasks text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Pending Tasks</h3>
<p class="text-2xl font-bold">5</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100 text-green-600 mr-4">
<i class="fas fa-file-invoice text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Pending Invoices</h3>
<p class="text-2xl font-bold">3</p>
</div>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md mb-8">
<h2 class="text-xl font-semibold mb-4">Quick Actions</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<button onclick="showSection('create-po')" class="bg-blue-100 hover:bg-blue-200 text-blue-800 py-3 px-4 rounded-lg transition flex items-center">
<i class="fas fa-file-invoice mr-2"></i>
Create Purchase Order
</button>
<button onclick="showSection('accept-goods')" class="bg-green-100 hover:bg-green-200 text-green-800 py-3 px-4 rounded-lg transition flex items-center">
<i class="fas fa-check-circle mr-2"></i>
Accept Goods
</button>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Recent Activities</h2>
<div class="space-y-4">
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-blue-100 text-blue-600 mr-3">
<i class="fas fa-plus"></i>
</div>
<div>
<p class="font-medium">Added new product "Vitamin C Tablets"</p>
<p class="text-sm text-gray-500">2 hours ago</p>
</div>
</div>
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-green-100 text-green-600 mr-3">
<i class="fas fa-check"></i>
</div>
<div>
<p class="font-medium">Accepted delivery from "MediCare Suppliers"</p>
<p class="text-sm text-gray-500">Yesterday, 3:45 PM</p>
</div>
</div>
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-purple-100 text-purple-600 mr-3">
<i class="fas fa-file-invoice"></i>
</div>
<div>
<p class="font-medium">Generated PO #12345 for "PharmaPlus"</p>
<p class="text-sm text-gray-500">Yesterday, 10:30 AM</p>
</div>
</div>
</div>
</div>
</div>
<!-- Add Product Form -->
<div id="add-product" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Add New Product</h2>
<form>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label class="block text-gray-700 mb-2" for="brand-name">Brand Name</label>
<input type="text" id="brand-name" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label class="block text-gray-700 mb-2" for="product-name">Product Name</label>
<input type="text" id="product-name" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label class="block text-gray-700 mb-2" for="packaging-qty">Packaging Quantity</label>
<input type="number" id="packaging-qty" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label class="block text-gray-700 mb-2" for="packaging-unit">Packaging Unit</label>
<select id="packaging-unit" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
<option value="">Select Unit</option>
<option value="GMS">Grams (GMS)</option>
<option value="KG">Kilograms (KG)</option>
<option value="ML">Milliliters (ML)</option>
<option value="LTRS">Liters (LTRS)</option>
<option value="TAB">Tablets (TAB)</option>
<option value="CAP">Capsules (CAP)</option>
</select>
</div>
<div>
<label class="block text-gray-700 mb-2" for="price">Price</label>
<input type="number" step="0.01" id="price" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label class="block text-gray-700 mb-2" for="hsn-code">HSN Code</label>
<input type="text" id="hsn-code" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label class="block text-gray-700 mb-2" for="batch-no">Batch Number</label>
<input type="text" id="batch-no" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label class="block text-gray-700 mb-2" for="mfg-date">Manufacturing Date</label>
<input type="date" id="mfg-date" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label class="block text-gray-700 mb-2" for="exp-date">Expiry Date</label>
<input type="date" id="exp-date" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
</div>
<div class="mt-6">
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-6 rounded-lg transition">Save Product</button>
</div>
</form>
</div>
</div>
<!-- Link Product to Vendor -->
<div id="link-product" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Link Product to Vendor</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div>
<h3 class="text-lg font-medium mb-3">Products</h3>
<div class="border rounded-lg p-3 max-h-96 overflow-y-auto">
<div class="flex items-center mb-2">
<input type="checkbox" id="product-1" class="mr-2">
<label for="product-1">Paracetamol 500mg (Bottle of 100)</label>
</div>
<div class="flex items-center mb-2">
<input type="checkbox" id="product-2" class="mr-2">
<label for="product-2">Vitamin C 1000mg (Bottle of 60)</label>
</div>
<div class="flex items-center mb-2">
<input type="checkbox" id="product-3" class="mr-2">
<label for="product-3">Ibuprofen 400mg (Strip of 10)</label>
</div>
<div class="flex items-center mb-2">
<input type="checkbox" id="product-4" class="mr-2">
<label for="product-4">Amoxicillin 500mg (Bottle of 30)</label>
</div>
<div class="flex items-center mb-2">
<input type="checkbox" id="product-5" class="mr-2">
<label for="product-5">Cetirizine 10mg (Strip of 10)</label>
</div>
</div>
</div>
<div>
<h3 class="text-lg font-medium mb-3">Vendors</h3>
<div class="border rounded-lg p-3 max-h-96 overflow-y-auto">
<div class="flex items-center mb-2">
<input type="checkbox" id="vendor-1" class="mr-2">
<label for="vendor-1">MediCare Suppliers</label>
</div>
<div class="flex items-center mb-2">
<input type="checkbox" id="vendor-2" class="mr-2">
<label for="vendor-2">PharmaPlus Distributors</label>
</div>
<div class="flex items-center mb-2">
<input type="checkbox" id="vendor-3" class="mr-2">
<label for="vendor-3">Global Health Products</label>
</div>
<div class="flex items-center mb-2">
<input type="checkbox" id="vendor-4" class="mr-2">
<label for="vendor-4">LifeLine Pharmaceuticals</label>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg mb-6">
<h3 class="text-lg font-medium mb-3">Vendor-Specific Details</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-gray-700 mb-2" for="vendor-price">Vendor-Specific Price</label>
<input type="number" step="0.01" id="vendor-price" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label class="block text-gray-700 mb-2" for="lead-time">Lead Time (days)</label>
<input type="number" id="lead-time" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
</div>
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-6 rounded-lg transition">Save Links</button>
</div>
</div>
<!-- Create Purchase Order -->
<div id="create-po" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Create Purchase Order</h2>
<div class="mb-6">
<h3 class="text-lg font-medium mb-3">Low Stock Items</h3>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Product</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Current Stock</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Reorder Level</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Vendor</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Order Qty</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">Paracetamol 500mg</td>
<td class="px-6 py-4 whitespace-nowrap">15 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">20 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">
<select class="border rounded px-2 py-1">
<option>MediCare Suppliers</option>
<option>PharmaPlus Distributors</option>
</select>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="number" value="30" class="border rounded px-2 py-1 w-20">
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">Vitamin C 1000mg</td>
<td class="px-6 py-4 whitespace-nowrap">8 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">15 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">
<select class="border rounded px-2 py-1">
<option>Global Health Products</option>
<option>LifeLine Pharmaceuticals</option>
</select>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="number" value="25" class="border rounded px-2 py-1 w-20">
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">Ibuprofen 400mg</td>
<td class="px-6 py-4 whitespace-nowrap">12 strips</td>
<td class="px-6 py-4 whitespace-nowrap">25 strips</td>
<td class="px-6 py-4 whitespace-nowrap">
<select class="border rounded px-2 py-1">
<option>MediCare Suppliers</option>
<option>PharmaPlus Distributors</option>
</select>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="number" value="40" class="border rounded px-2 py-1 w-20">
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="flex justify-end">
<button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-6 rounded-lg transition">Generate PO</button>
</div>
</div>
</div>
<!-- Accept Goods -->
<div id="accept-goods" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Accept Goods</h2>
<div class="mb-6">
<h3 class="text-lg font-medium mb-3">Pending Purchase Orders</h3>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">PO Number</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Vendor</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">Action</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">PO-2023-00123</td>
<td class="px-6 py-4 whitespace-nowrap">MediCare Suppliers</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-15</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs">Pending</span></td>
<td class="px-6 py-4 whitespace-nowrap">
<button onclick="showPOItems('po-123')" class="text-blue-600 hover:text-blue-800">View Items</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">PO-2023-00124</td>
<td class="px-6 py-4 whitespace-nowrap">Global Health Products</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-18</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs">Pending</span></td>
<td class="px-6 py-4 whitespace-nowrap">
<button onclick="showPOItems('po-124')" class="text-blue-600 hover:text-blue-800">View Items</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- PO Items (hidden by default) -->
<div id="po-items" class="hidden">
<h3 class="text-lg font-medium mb-3">Items in PO-2023-00123</h3>
<div class="border rounded-lg overflow-hidden mb-6">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Product</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ordered Qty</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Received Qty</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Order Price</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Current Price</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Difference</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">Paracetamol 500mg</td>
<td class="px-6 py-4 whitespace-nowrap">30 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="number" value="30" class="border rounded px-2 py-1 w-20">
</td>
<td class="px-6 py-4 whitespace-nowrap">₹120.00</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="number" value="125.00" step="0.01" class="border rounded px-2 py-1 w-24">
</td>
<td class="px-6 py-4 whitespace-nowrap text-red-600">+₹5.00</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">Ibuprofen 400mg</td>
<td class="px-6 py-4 whitespace-nowrap">40 strips</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="number" value="38" class="border rounded px-2 py-1 w-20">
</td>
<td class="px-6 py-4 whitespace-nowrap">₹85.00</td>
<td class="px-6 py-4 whitespace-nowrap">
<input type="number" value="85.00" step="0.01" class="border rounded px-2 py-1 w-24">
</td>
<td class="px-6 py-4 whitespace-nowrap">₹0.00</td>
</tr>
</tbody>
</table>
</div>
<div class="flex justify-end">
<button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-6 rounded-lg transition">Accept Goods</button>
</div>
</div>
</div>
</div>
<!-- Create Internal Invoice -->
<div id="create-invoice" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Create Internal Invoice</h2>
<div class="mb-6">
<h3 class="text-lg font-medium mb-3">Quality Checked Goods</h3>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Product</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Received Qty</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Passed Qty</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Price</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">Paracetamol 500mg</td>
<td class="px-6 py-4 whitespace-nowrap">30 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">28 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">₹125.00</td>
<td class="px-6 py-4 whitespace-nowrap">₹3,500.00</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">Ibuprofen 400mg</td>
<td class="px-6 py-4 whitespace-nowrap">38 strips</td>
<td class="px-6 py-4 whitespace-nowrap">36 strips</td>
<td class="px-6 py-4 whitespace-nowrap">₹85.00</td>
<td class="px-6 py-4 whitespace-nowrap">₹3,060.00</td>
</tr>
</tbody>
<tfoot class="bg-gray-50">
<tr>
<td colspan="4" class="px-6 py-4 text-right font-medium">Total Amount:</td>
<td class="px-6 py-4 font-bold">₹6,560.00</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="flex justify-end">
<button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-6 rounded-lg transition">Generate Invoice</button>
</div>
</div>
</div>
<!-- Finalize Payments -->
<div id="finalize-payments" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Finalize Payments</h2>
<div class="mb-6">
<h3 class="text-lg font-medium mb-3">Pending Invoices</h3>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Invoice No</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Vendor</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">Amount</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">Action</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">INV-2023-00456</td>
<td class="px-6 py-4 whitespace-nowrap">MediCare Suppliers</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-20</td>
<td class="px-6 py-4 whitespace-nowrap">₹6,560.00</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs">Pending</span></td>
<td class="px-6 py-4 whitespace-nowrap">
<button onclick="showPaymentForm('inv-456')" class="text-blue-600 hover:text-blue-800">Make Payment</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">INV-2023-00457</td>
<td class="px-6 py-4 whitespace-nowrap">Global Health Products</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-22</td>
<td class="px-6 py-4 whitespace-nowrap">₹8,750.00</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Paid</span></td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="text-gray-500">Completed</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Payment Form (hidden by default) -->
<div id="payment-form" class="hidden bg-gray-50 p-4 rounded-lg mb-6">
<h3 class="text-lg font-medium mb-3">Payment Details for INV-2023-00456</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-gray-700 mb-2" for="payment-amount">Payment Amount</label>
<input type="number" step="0.01" id="payment-amount" value="6560.00" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label class="block text-gray-700 mb-2" for="payment-date">Payment Date</label>
<input type="date" id="payment-date" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div class="md:col-span-2">
<label class="block text-gray-700 mb-2" for="payment-ref">Payment Reference</label>
<input type="text" id="payment-ref" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="e.g. Bank Transaction ID">
</div>
</div>
<div class="flex justify-end">
<button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-6 rounded-lg transition">Record Payment</button>
</div>
</div>
</div>
</div>
<!-- Return Voucher -->
<div id="return-voucher" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Return Voucher Management</h2>
<div class="mb-6">
<h3 class="text-lg font-medium mb-3">Rejected Quantities</h3>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Product</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Vendor</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Received Qty</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Rejected Qty</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">Action</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">Paracetamol 500mg</td>
<td class="px-6 py-4 whitespace-nowrap">MediCare Suppliers</td>
<td class="px-6 py-4 whitespace-nowrap">30 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">2 bottles</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs">Pending</span></td>
<td class="px-6 py-4 whitespace-nowrap">
<button onclick="generateReturnVoucher('return-1')" class="text-blue-600 hover:text-blue-800">Generate Voucher</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">Ibuprofen 400mg</td>
<td class="px-6 py-4 whitespace-nowrap">MediCare Suppliers</td>
<td class="px-6 py-4 whitespace-nowrap">38 strips</td>
<td class="px-6 py-4 whitespace-nowrap">2 strips</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Returned</span></td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="text-gray-500">Completed</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Return Voucher Form (hidden by default) -->
<div id="return-voucher-form" class="hidden bg-gray-50 p-4 rounded-lg mb-6">
<h3 class="text-lg font-medium mb-3">Return Voucher Details</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-gray-700 mb-2">Product</label>
<p class="px-3 py-2 bg-white rounded-lg border">Paracetamol 500mg</p>
</div>
<div>
<label class="block text-gray-700 mb-2">Vendor</label>
<p class="px-3 py-2 bg-white rounded-lg border">MediCare Suppliers</p>
</div>
<div>
<label class="block text-gray-700 mb-2">Rejected Quantity</label>
<p class="px-3 py-2 bg-white rounded-lg border">2 bottles</p>
</div>
<div>
<label class="block text-gray-700 mb-2" for="return-date">Return Date</label>
<input type="date" id="return-date" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div class="md:col-span-2">
<label class="block text-gray-700 mb-2" for="return-notes">Notes</label>
<textarea id="return-notes" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" rows="3"></textarea>
</div>
</div>
<div class="flex justify-end space-x-3">
<button onclick="markAsReturned('return-1')" class="bg-green-600 hover:bg-green-700 text-white py-2 px-6 rounded-lg transition">Mark as Returned</button>
<button onclick="cancelReturnVoucher()" class="bg-gray-600 hover:bg-gray-700 text-white py-2 px-6 rounded-lg transition">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Vendor Dashboard -->
<div id="vendor-dashboard" class="hidden min-h-screen flex">
<!-- Sidebar -->
<div class="sidebar bg-green-800 text-white w-64 min-h-screen fixed">
<div class="p-4 flex items-center">
<i class="fas fa-truck text-2xl mr-3"></i>
<span class="logo-text font-bold text-xl">Vendor Portal</span>
</div>
<div class="mt-8">
<div class="px-4 py-2 hover:bg-green-700 cursor-pointer flex items-center">
<i class="fas fa-tachometer-alt mr-3"></i>
<span class="nav-text">Dashboard</span>
</div>
<div onclick="showVendorSection('received-goods')" class="px-4 py-2 hover:bg-green-700 cursor-pointer flex items-center">
<i class="fas fa-box-open mr-3"></i>
<span class="nav-text">Received Goods</span>
</div>
<div onclick="showVendorSection('payments')" class="px-4 py-2 hover:bg-green-700 cursor-pointer flex items-center">
<i class="fas fa-money-bill-wave mr-3"></i>
<span class="nav-text">Payments</span>
</div>
<div onclick="showVendorSection('order-details')" class="px-4 py-2 hover:bg-green-700 cursor-pointer flex items-center">
<i class="fas fa-file-invoice mr-3"></i>
<span class="nav-text">Order Details</span>
</div>
<div onclick="logout()" class="px-4 py-2 hover:bg-green-700 cursor-pointer flex items-center mt-4">
<i class="fas fa-sign-out-alt mr-3"></i>
<span class="nav-text">Logout</span>
</div>
</div>
</div>
<!-- Main Content -->
<div class="main-content ml-64 flex-1 p-8">
<h1 class="text-2xl font-bold text-gray-800 mb-6">Vendor Dashboard</h1>
<!-- Dashboard Overview -->
<div id="vendor-dashboard-overview" class="section">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100 text-green-600 mr-4">
<i class="fas fa-box-open text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Recent Deliveries</h3>
<p class="text-2xl font-bold">5</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4">
<i class="fas fa-money-bill-wave text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Pending Payments</h3>
<p class="text-2xl font-bold">₹12,450.00</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-purple-100 text-purple-600 mr-4">
<i class="fas fa-file-invoice text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Active Orders</h3>
<p class="text-2xl font-bold">3</p>
</div>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Recent Activities</h2>
<div class="space-y-4">
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-green-100 text-green-600 mr-3">
<i class="fas fa-check"></i>
</div>
<div>
<p class="font-medium">Delivery accepted for PO-2023-00123</p>
<p class="text-sm text-gray-500">Yesterday, 4:30 PM</p>
</div>
</div>
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-blue-100 text-blue-600 mr-3">
<i class="fas fa-money-bill-wave"></i>
</div>
<div>
<p class="font-medium">Payment received for INV-2023-00455 (₹8,750.00)</p>
<p class="text-sm text-gray-500">June 22, 2023</p>
</div>
</div>
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-purple-100 text-purple-600 mr-3">
<i class="fas fa-truck"></i>
</div>
<div>
<p class="font-medium">New purchase order received (PO-2023-00125)</p>
<p class="text-sm text-gray-500">June 21, 2023</p>
</div>
</div>
</div>
</div>
</div>
<!-- Received Goods -->
<div id="received-goods" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Received Goods</h2>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Product Name</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Quantity Received</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date Received</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">PO Reference</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">Paracetamol 500mg</td>
<td class="px-6 py-4 whitespace-nowrap">30 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-20</td>
<td class="px-6 py-4 whitespace-nowrap">PO-2023-00123</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">Vitamin C 1000mg</td>
<td class="px-6 py-4 whitespace-nowrap">25 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-18</td>
<td class="px-6 py-4 whitespace-nowrap">PO-2023-00124</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">Ibuprofen 400mg</td>
<td class="px-6 py-4 whitespace-nowrap">40 strips</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-15</td>
<td class="px-6 py-4 whitespace-nowrap">PO-2023-00122</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Payments -->
<div id="payments" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Payments</h2>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Invoice Number</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount Paid</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Payment Date</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Payment Reference</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">INV-2023-00455</td>
<td class="px-6 py-4 whitespace-nowrap">₹8,750.00</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-22</td>
<td class="px-6 py-4 whitespace-nowrap">BANK-987654</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">INV-2023-00452</td>
<td class="px-6 py-4 whitespace-nowrap">₹6,200.00</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-15</td>
<td class="px-6 py-4 whitespace-nowrap">BANK-987321</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">INV-2023-00448</td>
<td class="px-6 py-4 whitespace-nowrap">₹5,800.00</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-08</td>
<td class="px-6 py-4 whitespace-nowrap">BANK-986754</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Order Details -->
<div id="order-details" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Order Details</h2>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Purchase Order ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Product Name</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Quantity Ordered</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Order Date</th>
<th 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">PO-2023-00125</td>
<td class="px-6 py-4 whitespace-nowrap">Amoxicillin 500mg</td>
<td class="px-6 py-4 whitespace-nowrap">25 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-21</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs">Pending</span></td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">PO-2023-00123</td>
<td class="px-6 py-4 whitespace-nowrap">Paracetamol 500mg</td>
<td class="px-6 py-4 whitespace-nowrap">30 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-15</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Delivered</span></td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">PO-2023-00124</td>
<td class="px-6 py-4 whitespace-nowrap">Vitamin C 1000mg</td>
<td class="px-6 py-4 whitespace-nowrap">25 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">2023-06-18</td>
<td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Delivered</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Quality Checker Dashboard -->
<div id="qualitychecker-dashboard" class="hidden min-h-screen flex">
<!-- Sidebar -->
<div class="sidebar bg-purple-800 text-white w-64 min-h-screen fixed">
<div class="p-4 flex items-center">
<i class="fas fa-clipboard-check text-2xl mr-3"></i>
<span class="logo-text font-bold text-xl">Quality Checker</span>
</div>
<div class="mt-8">
<div class="px-4 py-2 hover:bg-purple-700 cursor-pointer flex items-center">
<i class="fas fa-tachometer-alt mr-3"></i>
<span class="nav-text">Dashboard</span>
</div>
<div onclick="showQCSection('enter-qc')" class="px-4 py-2 hover:bg-purple-700 cursor-pointer flex items-center">
<i class="fas fa-check-circle mr-3"></i>
<span class="nav-text">Enter Quality Check</span>
</div>
<div onclick="logout()" class="px-4 py-2 hover:bg-purple-700 cursor-pointer flex items-center mt-4">
<i class="fas fa-sign-out-alt mr-3"></i>
<span class="nav-text">Logout</span>
</div>
</div>
</div>
<!-- Main Content -->
<div class="main-content ml-64 flex-1 p-8">
<h1 class="text-2xl font-bold text-gray-800 mb-6">Quality Checker Dashboard</h1>
<!-- Dashboard Overview -->
<div id="qc-dashboard-overview" class="section">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-purple-100 text-purple-600 mr-4">
<i class="fas fa-clipboard-list text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Pending QC Checks</h3>
<p class="text-2xl font-bold">4</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100 text-green-600 mr-4">
<i class="fas fa-check-circle text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Completed Today</h3>
<p class="text-2xl font-bold">7</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md card-hover transition">
<div class="flex items-center">
<div class="p-3 rounded-full bg-red-100 text-red-600 mr-4">
<i class="fas fa-times-circle text-xl"></i>
</div>
<div>
<h3 class="text-gray-500">Rejected Today</h3>
<p class="text-2xl font-bold">2</p>
</div>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Recent Quality Checks</h2>
<div class="space-y-4">
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-green-100 text-green-600 mr-3">
<i class="fas fa-check"></i>
</div>
<div>
<p class="font-medium">Approved 28/30 bottles of Paracetamol 500mg</p>
<p class="text-sm text-gray-500">Today, 11:30 AM</p>
</div>
</div>
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-red-100 text-red-600 mr-3">
<i class="fas fa-times"></i>
</div>
<div>
<p class="font-medium">Rejected 2/30 bottles of Paracetamol 500mg</p>
<p class="text-sm text-gray-500">Today, 11:30 AM</p>
</div>
</div>
<div class="flex items-start border-b pb-3">
<div class="p-2 rounded-full bg-green-100 text-green-600 mr-3">
<i class="fas fa-check"></i>
</div>
<div>
<p class="font-medium">Approved 36/38 strips of Ibuprofen 400mg</p>
<p class="text-sm text-gray-500">Today, 10:15 AM</p>
</div>
</div>
</div>
</div>
</div>
<!-- Enter Quality Check -->
<div id="enter-qc" class="section hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold mb-4">Enter Quality Check</h2>
<div class="mb-6">
<h3 class="text-lg font-medium mb-3">Goods Awaiting Quality Check</h3>
<div class="border rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Product</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Vendor</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Received Qty</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">Amoxicillin 500mg</td>
<td class="px-6 py-4 whitespace-nowrap">LifeLine Pharmaceuticals</td>
<td class="px-6 py-4 whitespace-nowrap">25 bottles</td>
<td class="px-6 py-4 whitespace-nowrap">
<button onclick="showQCForm('qc-1')"
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Inventory Management System</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar.collapsed {
width: 70px;
}
.sidebar.collapsed .nav-text {
display: none;
}
.sidebar.collapsed .logo-text {
display: none;
}
.main-content {
transition: all 0.3s ease;
}
.sidebar.collapsed + .main-content {
margin-left: 70px;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.datepicker {
z-index: 1000;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<!-- Login Container (Default View) -->
<div id="login-container" class="min-h-screen flex items-center justify-center bg-gray-100">
<div class="bg-white p-8 rounded-lg shadow-lg w-full max-w-md">
<div class="text-center mb-8">
<h1 class="text-3xl font-bold text-gray-800">Inventory Management</h1>
<p class="text-gray-600">Select your role to login</p>
</div>
<div class="grid grid-cols-2 gap-4 mb-8">
<button onclick="showLoginForm('storekeeper')" class="bg-blue-100 hover:bg-blue-200 text-blue-800 py-3 px-4 rounded-lg transition flex flex-col items-center">
<i class="fas fa-warehouse text-2xl mb-2"></i>
<span>Storekeeper</span>
</button>
<button onclick="showLoginForm('vendor')" class="bg-green-100 hover:bg-green-200 text-green-800 py-3 px-4 rounded-lg transition flex flex-col items-center">
<i class="fas fa-truck text-2xl mb-2"></i>
<span>Vendor</span>
</button>
<button onclick="showLoginForm('qualitychecker')" class="bg-purple-100 hover:bg-purple-200 text-purple-800 py-3 px-4 rounded-lg transition flex flex-col items-center">
<i class="fas fa-clipboard-check text-2xl mb-2"></i>
<span>Quality Checker</span>
</button>
<button onclick="showLoginForm('admin')" class="bg-red-100 hover:bg-red-200 text-red-800 py-3 px-4 rounded-lg transition flex flex-col items-center">
<i class="fas fa-user-shield text-2xl mb-2"></i>
<span>Admin</span>
</button>
</div>
<!-- Storekeeper Login Form -->
<div id="storekeeper-login" class="login-form hidden">
<h2 class="text-xl font-semibold mb-4 text-center text-blue-700">Storekeeper Login</h2>
<form onsubmit="login('storekeeper'); return false;">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="sk-username">Username</label>
<input type="text" id="sk-username" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="sk-password">Password</label>
<input type="password" id="sk-password" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg transition">Login</button>
</form>
<button onclick="hideLoginForms()" class="mt-4 text-blue-600 hover:text-blue-800">← Back to role selection</button>
</div>
<!-- Vendor Login Form -->
<div id="vendor-login" class="login-form hidden">
<h2 class="text-xl font-semibold mb-4 text-center text-green-700">Vendor Login</h2>
<form onsubmit="login('vendor'); return false;">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="v-id">Vendor ID</label>
<input type="text" id="v-id" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500" required>
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="v-password">Password</label>
<input type="password" id="v-password" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500" required>
</div>
<button type="submit" class="w-full bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-lg transition">Login</button>
</form>
<button onclick="hideLoginForms()" class="mt-4 text-green-600 hover:text-green-800">← Back to role selection</button>
</div>
<!-- Quality Checker Login Form -->
<div id="qualitychecker-login" class="login-form hidden">