inventory / index.html
Stanley255's picture
Add 3 files
5b60e67 verified
Raw History Blame Contribute Delete
79.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PharmaCare - Inventory Management</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; } .notification-badge { position: absolute; top: -5px; right: -5px; background-color: #ef4444; color: white; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10px; } .chart-container { position: relative; height: 300px; } .low-stock { background-color: #fef2f2; border-left: 4px solid #ef4444; } .expiring-soon { background-color: #fffbeb; border-left: 4px solid #f59e0b; } </style> </head> <body class="bg-gray-100 font-sans"> <div class="flex h-screen overflow-hidden"> <!-- Sidebar --> <div class="sidebar bg-blue-800 text-white w-64 flex flex-col"> <div class="p-4 flex items-center justify-between border-b border-blue-700"> <div class="flex items-center"> <i class="fas fa-pills text-2xl mr-3"></i> <span class="logo-text text-xl font-bold">PharmaCare</span> </div> <button id="toggleSidebar" class="text-white focus:outline-none"> <i class="fas fa-bars"></i> </button> </div> <div class="p-4 border-b border-blue-700 flex items-center"> <div class="w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center mr-3"> <i class="fas fa-user"></i> </div> <div class="nav-text"> <div class="font-medium">Admin User</div> <div class="text-xs text-blue-200">Administrator</div> </div> </div> <nav class="flex-1 overflow-y-auto"> <div class="p-2"> <a href="#" class="dashboard-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-tachometer-alt mr-3"></i> <span class="nav-text">Dashboard</span> </a> <a href="#" class="inventory-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-boxes mr-3"></i> <span class="nav-text">Inventory</span> </a> <a href="#" class="medicines-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-pills mr-3"></i> <span class="nav-text">Medicines</span> </a> <a href="#" class="categories-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-tags mr-3"></i> <span class="nav-text">Categories</span> </a> <a href="#" class="suppliers-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-truck mr-3"></i> <span class="nav-text">Suppliers</span> </a> <a href="#" class="sales-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-shopping-cart mr-3"></i> <span class="nav-text">Sales</span> </a> <a href="#" class="reports-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-chart-bar mr-3"></i> <span class="nav-text">Reports</span> </a> </div> <div class="p-2 border-t border-blue-700"> <a href="#" class="settings-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-cog mr-3"></i> <span class="nav-text">Settings</span> </a> <a href="#" class="logout-nav flex items-center p-3 rounded hover:bg-blue-700 text-white"> <i class="fas fa-sign-out-alt mr-3"></i> <span class="nav-text">Logout</span> </a> </div> </nav> </div> <!-- Main Content --> <div class="main-content flex-1 overflow-auto ml-64"> <!-- Top Navigation --> <header class="bg-white shadow-sm"> <div class="flex items-center justify-between p-4"> <h1 class="text-2xl font-bold text-gray-800" id="pageTitle">Dashboard</h1> <div class="flex items-center space-x-4"> <div class="relative"> <button class="p-2 rounded-full hover:bg-gray-100 focus:outline-none"> <i class="fas fa-bell text-gray-600"></i> <span class="notification-badge">3</span> </button> </div> <div class="relative"> <button class="p-2 rounded-full hover:bg-gray-100 focus:outline-none"> <i class="fas fa-envelope text-gray-600"></i> <span class="notification-badge">5</span> </button> </div> <div class="border-l border-gray-200 h-8"></div> <div class="flex items-center"> <div class="w-8 h-8 rounded-full bg-blue-600 flex items-center justify-center mr-2"> <i class="fas fa-user text-white"></i> </div> <span class="text-sm font-medium">Admin</span> </div> </div> </div> </header> <!-- Dashboard Content --> <div id="dashboardContent" class="p-6"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6"> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-gray-500">Total Medicines</p> <h3 class="text-2xl font-bold" id="totalMedicines">0</h3> </div> <div class="p-3 rounded-full bg-blue-100 text-blue-600"> <i class="fas fa-pills text-xl"></i> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-gray-500">Low Stock Items</p> <h3 class="text-2xl font-bold" id="lowStockItems">0</h3> </div> <div class="p-3 rounded-full bg-red-100 text-red-600"> <i class="fas fa-exclamation-triangle text-xl"></i> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-gray-500">Expiring Soon</p> <h3 class="text-2xl font-bold" id="expiringSoon">0</h3> </div> <div class="p-3 rounded-full bg-yellow-100 text-yellow-600"> <i class="fas fa-clock text-xl"></i> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-gray-500">Total Categories</p> <h3 class="text-2xl font-bold" id="totalCategories">0</h3> </div> <div class="p-3 rounded-full bg-green-100 text-green-600"> <i class="fas fa-tags text-xl"></i> </div> </div> </div> </div> <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6"> <div class="bg-white rounded-lg shadow p-6 lg:col-span-2"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Stock Overview</h3> <select class="border rounded px-3 py-1 text-sm"> <option>Last 7 Days</option> <option>Last 30 Days</option> <option>Last 90 Days</option> </select> </div> <div class="chart-container"> <canvas id="stockChart"></canvas> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <h3 class="text-lg font-semibold mb-4">Recent Activities</h3> <div class="space-y-4"> <div class="flex items-start"> <div class="p-2 rounded-full bg-blue-100 text-blue-600 mr-3"> <i class="fas fa-plus"></i> </div> <div> <p class="text-sm font-medium">New medicine added</p> <p class="text-xs text-gray-500">Paracetamol 500mg</p> <p class="text-xs text-gray-400">2 hours ago</p> </div> </div> <div class="flex items-start"> <div class="p-2 rounded-full bg-green-100 text-green-600 mr-3"> <i class="fas fa-shopping-cart"></i> </div> <div> <p class="text-sm font-medium">Sale recorded</p> <p class="text-xs text-gray-500">Order #12345</p> <p class="text-xs text-gray-400">5 hours ago</p> </div> </div> <div class="flex items-start"> <div class="p-2 rounded-full bg-yellow-100 text-yellow-600 mr-3"> <i class="fas fa-exclamation-triangle"></i> </div> <div> <p class="text-sm font-medium">Low stock alert</p> <p class="text-xs text-gray-500">Amoxicillin 250mg</p> <p class="text-xs text-gray-400">1 day ago</p> </div> </div> </div> </div> </div> <div class="grid grid-cols-1 gap-6"> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="p-4 border-b flex justify-between items-center"> <h3 class="text-lg font-semibold">Low Stock Alerts</h3> <a href="#" class="text-sm text-blue-600 hover:underline">View All</a> </div> <div class="overflow-x-auto"> <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">Medicine</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Category</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">Threshold</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th> </tr> </thead> <tbody id="lowStockTableBody" class="bg-white divide-y divide-gray-200"> <!-- Low stock items will be populated here --> </tbody> </table> </div> </div> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="p-4 border-b flex justify-between items-center"> <h3 class="text-lg font-semibold">Expiring Soon</h3> <a href="#" class="text-sm text-blue-600 hover:underline">View All</a> </div> <div class="overflow-x-auto"> <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">Medicine</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Batch No.</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Expiry Date</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Days Left</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th> </tr> </thead> <tbody id="expiringSoonTableBody" class="bg-white divide-y divide-gray-200"> <!-- Expiring soon items will be populated here --> </tbody> </table> </div> </div> </div> </div> <!-- Inventory Content --> <div id="inventoryContent" class="p-6 hidden"> <div class="flex justify-between items-center mb-6"> <h2 class="text-2xl font-bold text-gray-800">Inventory Management</h2> <button id="addInventoryBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded flex items-center"> <i class="fas fa-plus mr-2"></i> Add Inventory </button> </div> <div class="bg-white rounded-lg shadow overflow-hidden mb-6"> <div class="p-4 border-b flex justify-between items-center"> <div class="flex items-center space-x-4"> <div class="relative"> <input type="text" id="inventorySearch" placeholder="Search inventory..." class="border rounded pl-10 pr-4 py-2 w-64 focus:outline-none focus:ring-2 focus:ring-blue-500"> <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> </div> <select id="inventoryFilter" class="border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> <option value="all">All Items</option> <option value="low">Low Stock</option> <option value="expiring">Expiring Soon</option> <option value="category">By Category</option> </select> </div> <button id="exportInventoryBtn" class="text-blue-600 hover:text-blue-800 flex items-center"> <i class="fas fa-file-export mr-2"></i> 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 class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Medicine</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Category</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Batch No.</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Quantity</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Expiry Date</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Supplier</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th> </tr> </thead> <tbody id="inventoryTableBody" class="bg-white divide-y divide-gray-200"> <!-- Inventory items will be populated here --> </tbody> </table> </div> <div class="px-6 py-4 border-t flex items-center justify-between"> <div class="text-sm text-gray-500"> Showing <span id="inventoryStart">1</span> to <span id="inventoryEnd">10</span> of <span id="inventoryTotal">0</span> entries </div> <div class="flex space-x-2"> <button id="inventoryPrev" class="px-3 py-1 border rounded disabled:opacity-50" disabled>Previous</button> <button id="inventoryNext" class="px-3 py-1 border rounded disabled:opacity-50" disabled>Next</button> </div> </div> </div> </div> <!-- Medicines Content --> <div id="medicinesContent" class="p-6 hidden"> <div class="flex justify-between items-center mb-6"> <h2 class="text-2xl font-bold text-gray-800">Medicine Management</h2> <button id="addMedicineBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded flex items-center"> <i class="fas fa-plus mr-2"></i> Add Medicine </button> </div> <div class="bg-white rounded-lg shadow overflow-hidden mb-6"> <div class="p-4 border-b flex justify-between items-center"> <div class="flex items-center space-x-4"> <div class="relative"> <input type="text" id="medicineSearch" placeholder="Search medicines..." class="border rounded pl-10 pr-4 py-2 w-64 focus:outline-none focus:ring-2 focus:ring-blue-500"> <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> </div> <select id="medicineFilter" class="border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> <option value="all">All Medicines</option> <option value="prescription">Prescription Only</option> <option value="otc">Over-the-Counter</option> <option value="controlled">Controlled Substances</option> </select> </div> <button id="exportMedicinesBtn" class="text-blue-600 hover:text-blue-800 flex items-center"> <i class="fas fa-file-export mr-2"></i> 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 class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Generic Name</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Category</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Unit</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">Actions</th> </tr> </thead> <tbody id="medicinesTableBody" class="bg-white divide-y divide-gray-200"> <!-- Medicines will be populated here --> </tbody> </table> </div> <div class="px-6 py-4 border-t flex items-center justify-between"> <div class="text-sm text-gray-500"> Showing <span id="medicinesStart">1</span> to <span id="medicinesEnd">10</span> of <span id="medicinesTotal">0</span> entries </div> <div class="flex space-x-2"> <button id="medicinesPrev" class="px-3 py-1 border rounded disabled:opacity-50" disabled>Previous</button> <button id="medicinesNext" class="px-3 py-1 border rounded disabled:opacity-50" disabled>Next</button> </div> </div> </div> </div> <!-- Categories Content --> <div id="categoriesContent" class="p-6 hidden"> <div class="flex justify-between items-center mb-6"> <h2 class="text-2xl font-bold text-gray-800">Medicine Categories</h2> <button id="addCategoryBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded flex items-center"> <i class="fas fa-plus mr-2"></i> Add Category </button> </div> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6"> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Antibiotics</h3> <span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">25 items</span> </div> <p class="text-gray-600 text-sm mb-4">Medicines that inhibit the growth of or destroy microorganisms.</p> <div class="flex justify-between"> <button class="text-blue-600 hover:text-blue-800 text-sm">View All</button> <div class="flex space-x-2"> <button class="text-gray-500 hover:text-gray-700"><i class="fas fa-edit"></i></button> <button class="text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Analgesics</h3> <span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">18 items</span> </div> <p class="text-gray-600 text-sm mb-4">Medicines that relieve pain without causing loss of consciousness.</p> <div class="flex justify-between"> <button class="text-blue-600 hover:text-blue-800 text-sm">View All</button> <div class="flex space-x-2"> <button class="text-gray-500 hover:text-gray-700"><i class="fas fa-edit"></i></button> <button class="text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Antihistamines</h3> <span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">12 items</span> </div> <p class="text-gray-600 text-sm mb-4">Medicines that counteract the effects of histamine in allergic reactions.</p> <div class="flex justify-between"> <button class="text-blue-600 hover:text-blue-800 text-sm">View All</button> <div class="flex space-x-2"> <button class="text-gray-500 hover:text-gray-700"><i class="fas fa-edit"></i></button> <button class="text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Antacids</h3> <span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">8 items</span> </div> <p class="text-gray-600 text-sm mb-4">Medicines that neutralize stomach acidity to relieve heartburn and indigestion.</p> <div class="flex justify-between"> <button class="text-blue-600 hover:text-blue-800 text-sm">View All</button> <div class="flex space-x-2"> <button class="text-gray-500 hover:text-gray-700"><i class="fas fa-edit"></i></button> <button class="text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button> </div> </div> </div> </div> <div class="mt-6 bg-white rounded-lg shadow overflow-hidden"> <div class="p-4 border-b"> <h3 class="text-lg font-semibold">All Categories</h3> </div> <div class="overflow-x-auto"> <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">Category Name</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">No. of Medicines</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th> </tr> </thead> <tbody id="categoriesTableBody" class="bg-white divide-y divide-gray-200"> <!-- Categories will be populated here --> </tbody> </table> </div> </div> </div> <!-- Suppliers Content --> <div id="suppliersContent" class="p-6 hidden"> <div class="flex justify-between items-center mb-6"> <h2 class="text-2xl font-bold text-gray-800">Supplier Management</h2> <button id="addSupplierBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded flex items-center"> <i class="fas fa-plus mr-2"></i> Add Supplier </button> </div> <div class="bg-white rounded-lg shadow overflow-hidden mb-6"> <div class="p-4 border-b flex justify-between items-center"> <div class="flex items-center space-x-4"> <div class="relative"> <input type="text" id="supplierSearch" placeholder="Search suppliers..." class="border rounded pl-10 pr-4 py-2 w-64 focus:outline-none focus:ring-2 focus:ring-blue-500"> <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> </div> </div> <button id="exportSuppliersBtn" class="text-blue-600 hover:text-blue-800 flex items-center"> <i class="fas fa-file-export mr-2"></i> 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 class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Supplier Name</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Contact Person</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Phone</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Products Supplied</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th> </tr> </thead> <tbody id="suppliersTableBody" class="bg-white divide-y divide-gray-200"> <!-- Suppliers will be populated here --> </tbody> </table> </div> <div class="px-6 py-4 border-t flex items-center justify-between"> <div class="text-sm text-gray-500"> Showing <span id="suppliersStart">1</span> to <span id="suppliersEnd">10</span> of <span id="suppliersTotal">0</span> entries </div> <div class="flex space-x-2"> <button id="suppliersPrev" class="px-3 py-1 border rounded disabled:opacity-50" disabled>Previous</button> <button id="suppliersNext" class="px-3 py-1 border rounded disabled:opacity-50" disabled>Next</button> </div> </div> </div> </div> <!-- Sales Content --> <div id="salesContent" class="p-6 hidden"> <div class="flex justify-between items-center mb-6"> <h2 class="text-2xl font-bold text-gray-800">Sales Management</h2> <button id="addSaleBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded flex items-center"> <i class="fas fa-plus mr-2"></i> New Sale </button> </div> <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6"> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-gray-500">Today's Sales</p> <h3 class="text-2xl font-bold">$1,245.75</h3> </div> <div class="p-3 rounded-full bg-green-100 text-green-600"> <i class="fas fa-shopping-cart text-xl"></i> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-gray-500">This Week</p> <h3 class="text-2xl font-bold">$5,892.30</h3> </div> <div class="p-3 rounded-full bg-blue-100 text-blue-600"> <i class="fas fa-chart-line text-xl"></i> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-gray-500">This Month</p> <h3 class="text-2xl font-bold">$24,567.89</h3> </div> <div class="p-3 rounded-full bg-purple-100 text-purple-600"> <i class="fas fa-calendar-alt text-xl"></i> </div> </div> </div> </div> <div class="bg-white rounded-lg shadow overflow-hidden mb-6"> <div class="p-4 border-b flex justify-between items-center"> <div class="flex items-center space-x-4"> <div class="relative"> <input type="text" id="salesSearch" placeholder="Search sales..." class="border rounded pl-10 pr-4 py-2 w-64 focus:outline-none focus:ring-2 focus:ring-blue-500"> <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> </div> <select id="salesFilter" class="border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> <option value="all">All Sales</option> <option value="today">Today</option> <option value="week">This Week</option> <option value="month">This Month</option> </select> </div> <button id="exportSalesBtn" class="text-blue-600 hover:text-blue-800 flex items-center"> <i class="fas fa-file-export mr-2"></i> 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 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">Date</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Customer</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Items</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total</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">Actions</th> </tr> </thead> <tbody id="salesTableBody" class="bg-white divide-y divide-gray-200"> <!-- Sales will be populated here --> </tbody> </table> </div> <div class="px-6 py-4 border-t flex items-center justify-between"> <div class="text-sm text-gray-500"> Showing <span id="salesStart">1</span> to <span id="salesEnd">10</span> of <span id="salesTotal">0</span> entries </div> <div class="flex space-x-2"> <button id="salesPrev" class="px-3 py-1 border rounded disabled:opacity-50" disabled>Previous</button> <button id="salesNext" class="px-3 py-1 border rounded disabled:opacity-50" disabled>Next</button> </div> </div> </div> </div> <!-- Reports Content --> <div id="reportsContent" class="p-6 hidden"> <h2 class="text-2xl font-bold text-gray-800 mb-6">Reports & Analytics</h2> <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6"> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Sales Report</h3> <select class="border rounded px-3 py-1 text-sm"> <option>Last 7 Days</option> <option>Last 30 Days</option> <option>Last 90 Days</option> <option>This Year</option> </select> </div> <div class="chart-container"> <canvas id="salesChart"></canvas> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Top Selling Medicines</h3> <select class="border rounded px-3 py-1 text-sm"> <option>This Month</option> <option>Last Month</option> <option>This Quarter</option> </select> </div> <div class="chart-container"> <canvas id="topProductsChart"></canvas> </div> </div> </div> <div class="grid grid-cols-1 gap-6"> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Inventory Status</h3> <div class="flex space-x-2"> <button class="px-3 py-1 border rounded text-sm">Export</button> <button class="px-3 py-1 bg-blue-600 text-white rounded text-sm">Print</button> </div> </div> <div class="overflow-x-auto"> <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">Category</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total Items</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">In Stock</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Low Stock</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Out of Stock</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <tr> <td class="px-6 py-4 whitespace-nowrap">Antibiotics</td> <td class="px-6 py-4 whitespace-nowrap">25</td> <td class="px-6 py-4 whitespace-nowrap">18</td> <td class="px-6 py-4 whitespace-nowrap">5</td> <td class="px-6 py-4 whitespace-nowrap">2</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap">Analgesics</td> <td class="px-6 py-4 whitespace-nowrap">18</td> <td class="px-6 py-4 whitespace-nowrap">15</td> <td class="px-6 py-4 whitespace-nowrap">3</td> <td class="px-6 py-4 whitespace-nowrap">0</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap">Antihistamines</td> <td class="px-6 py-4 whitespace-nowrap">12</td> <td class="px-6 py-4 whitespace-nowrap">10</td> <td class="px-6 py-4 whitespace-nowrap">2</td> <td class="px-6 py-4 whitespace-nowrap">0</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap">Antacids</td> <td class="px-6 py-4 whitespace-nowrap">8</td> <td class="px-6 py-4 whitespace-nowrap">6</td> <td class="px-6 py-4 whitespace-nowrap">1</td> <td class="px-6 py-4 whitespace-nowrap">1</td> </tr> </tbody> </table> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between mb-4"> <h3 class="text-lg font-semibold">Expiry Report</h3> <select class="border rounded px-3 py-1 text-sm"> <option>Next 30 Days</option> <option>Next 60 Days</option> <option>Next 90 Days</option> </select> </div> <div class="overflow-x-auto"> <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">Medicine</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Batch No.</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Expiry Date</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Days Left</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Quantity</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <tr> <td class="px-6 py-4 whitespace-nowrap">Amoxicillin 250mg</td> <td class="px-6 py-4 whitespace-nowrap">AMX-2023-01</td> <td class="px-6 py-4 whitespace-nowrap">15/08/2023</td> <td class="px-6 py-4 whitespace-nowrap">23</td> <td class="px-6 py-4 whitespace-nowrap">45</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap">Paracetamol 500mg</td> <td class="px-6 py-4 whitespace-nowrap">PAR-2023-02</td> <td class="px-6 py-4 whitespace-nowrap">22/08/2023</td> <td class="px-6 py-4 whitespace-nowrap">30</td> <td class="px-6 py-4 whitespace-nowrap">120</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap">Ibuprofen 200mg</td> <td class="px-6 py-4 whitespace-nowrap">IBU-2023-03</td> <td class="px-6 py-4 whitespace-nowrap">05/09/2023</td> <td class="px-6 py-4 whitespace-nowrap">44</td> <td class="px-6 py-4 whitespace-nowrap">75</td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap">Cetirizine 10mg</td> <td class="px-6 py-4 whitespace-nowrap">CET-2023-04</td> <td class="px-6 py-4 whitespace-nowrap">18/09/2023</td> <td class="px-6 py-4 whitespace-nowrap">57</td> <td class="px-6 py-4 whitespace-nowrap">60</td> </tr> </tbody> </table> </div> </div> </div> </div> <!-- Settings Content --> <div id="settingsContent" class="p-6 hidden"> <h2 class="text-2xl font-bold text-gray-800 mb-6">System Settings</h2> <div class="bg-white rounded-lg shadow overflow-hidden mb-6"> <div class="p-4 border-b"> <h3 class="text-lg font-semibold">General Settings</h3> </div> <div class="p-6"> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Pharmacy Name</label> <input type="text" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="PharmaCare"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Phone Number</label> <input type="text" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="+1 (555) 123-4567"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Email Address</label> <input type="email" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="contact@pharmacare.com"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Address</label> <input type="text" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="123 Medical St, Health City"> </div> </div> </div> </div> <div class="bg-white rounded-lg shadow overflow-hidden mb-6"> <div class="p-4 border-b"> <h3 class="text-lg font-semibold">Inventory Settings</h3> </div> <div class="p-6"> <div class="mb-4"> <label class="block text-sm font-medium text-gray-700 mb-1">Low Stock Threshold</label> <input type="number" class="w-32 border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="10"> <p class="text-xs text-gray-500 mt-1">Number of items remaining when low stock alert is triggered</p> </div> <div class="mb-4"> <label class="block text-sm font-medium text-gray-700 mb-1">Expiry Alert Days</label> <input type="number" class="w-32 border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="30"> <p class="text-xs text-gray-500 mt-1">Days before expiry when alert is triggered</p> </div> </div> </div> <div class="bg-white rounded-lg shadow overflow-hidden mb-6"> <div class="p-4 border-b"> <h3 class="text-lg font-semibold">User Management</h3> </div> <div class="p-6"> <div class="overflow-x-auto"> <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">Name</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Role</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Login</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <tr> <td class="px-6 py-4 whitespace-nowrap">Admin User</td> <td class="px-6 py-4 whitespace-nowrap">admin@pharmacare.com</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-xs">Administrator</span> </td> <td class="px-6 py-4 whitespace-nowrap">Today, 09:42 AM</td> <td class="px-6 py-4 whitespace-nowrap"> <button class="text-blue-600 hover:text-blue-800 mr-3">Edit</button> <button class="text-red-600 hover:text-red-800">Delete</button> </td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap">Pharmacist 1</td> <td class="px-6 py-4 whitespace-nowrap">pharmacist1@pharmacare.com</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 py-1 bg-green-100 text-green-800 rounded text-xs">Pharmacist</span> </td> <td class="px-6 py-4 whitespace-nowrap">Yesterday, 04:15 PM</td> <td class="px-6 py-4 whitespace-nowrap"> <button class="text-blue-600 hover:text-blue-800 mr-3">Edit</button> <button class="text-red-600 hover:text-red-800">Delete</button> </td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap">Cashier 1</td> <td class="px-6 py-4 whitespace-nowrap">cashier1@pharmacare.com</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 py-1 bg-purple-100 text-purple-800 rounded text-xs">Cashier</span> </td> <td class="px-6 py-4 whitespace-nowrap">Yesterday, 06:30 PM</td> <td class="px-6 py-4 whitespace-nowrap"> <button class="text-blue-600 hover:text-blue-800 mr-3">Edit</button> <button class="text-red-600 hover:text-red-800">Delete</button> </td> </tr> </tbody> </table> </div> <div class="mt-4"> <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded flex items-center"> <i class="fas fa-plus mr-2"></i> Add User </button> </div> </div> </div> <div class="flex justify-end"> <button class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded">Save Settings</button> </div> </div> <!-- Add Medicine Modal --> <div id="addMedicineModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-screen overflow-y-auto"> <div class="p-6"> <div class="flex justify-between items-center mb-4"> <h3 class="text-xl font-bold">Add New Medicine</h3> <button id="closeMedicineModal" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <form id="medicineForm"> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Medicine Name*</label> <input type="text" id="medicineName" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Generic Name</label> <input type="text" id="genericName" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Category*</label> <select id="medicineCategory" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> <option value="">Select Category</option> <option value="Antibiotics">Antibiotics</option> <option value="Analgesics">Analgesics</option> <option value="Antihistamines">Antihistamines</option> <option value="Antacids">Antacids</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Medicine Type*</label> <select id="medicineType" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> <option value="">Select Type</option> <option value="Prescription">Prescription Only</option> <option value="OTC">Over-the-Counter</option> <option value="Controlled">Controlled Substance</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Unit*</label> <select id="medicineUnit" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> <option value="">Select Unit</option> <option value="Tablet">Tablet</option> <option value="Capsule">Capsule</option> <option value="Bottle">Bottle</option> <option value="Tube">Tube</option> <option value="Box">Box</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Price*</label> <input type="number" id="medicinePrice" step="0.01" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Manufacturer</label> <input type="text" id="medicineManufacturer" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Barcode</label> <input type="text" id="medicineBarcode" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div class="md:col-span-2"> <label class="block text-sm font-medium text-gray-700 mb-1">Description</label> <textarea id="medicineDescription" rows="3" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea> </div> </div> <div class="mt-6 flex justify-end space-x-3"> <button type="button" id="cancelMedicine" class="px-4 py-2 border rounded text-gray-700 hover:bg-gray-100">Cancel</button> <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">Save Medicine</button> </div> </form> </div> </div> </div> <!-- Add Inventory Modal --> <div id="addInventoryModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-screen overflow-y-auto"> <div class="p-6"> <div class="flex justify-between items-center mb-4"> <h3 class="text-xl font-bold">Add Inventory Item</h3> <button id="closeInventoryModal" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <form id="inventoryForm"> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Medicine*</label> <select id="inventoryMedicine" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> <option value="">Select Medicine</option> <option value="1">Paracetamol 500mg</option> <option value="2">Amoxicillin 250mg</option> <option value="3">Ibuprofen 200mg</option> <option value="4">Cetirizine 10mg</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Batch Number*</label> <input type="text" id="inventoryBatch" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Quantity*</label> <input type="number" id="inventoryQuantity" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Expiry Date*</label> <input type="date" id="inventoryExpiry" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Purchase Price*</label> <input type="number" id="inventoryPrice" step="0.01" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Supplier*</label> <select id="inventorySupplier" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> <option value="">Select Supplier</option> <option value="1">MediSupply Co.</option> <option value="2">PharmaDist Inc.</option> <option value="3">HealthCare Suppliers</option> </select> </div> <div class="md:col-span-2"> <label class="block text-sm font-medium text-gray-700 mb-1">Notes</label> <textarea id="inventoryNotes" rows="2" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea> </div> </div> <div class="mt-6 flex justify-end space-x-3"> <button type="button" id="cancelInventory" class="px-4 py-2 border rounded text-gray-700 hover:bg-gray-100">Cancel</button> <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">Add to Inventory</button> </div> </form> </div> </div> </div> <!-- Add Category Modal --> <div id="addCategoryModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-md max-h-screen overflow-y-auto"> <div class="p-6"> <div class="flex justify-between items-center mb-4"> <h3 class="text-xl font-bold">Add New Category</h3> <button id="closeCategoryModal" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <form id="categoryForm"> <div class="mb-4"> <label class="block text-sm font-medium text-gray-700 mb-1">Category Name*</label> <input type="text" id="categoryName" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div class="mb-4"> <label class="block text-sm font-medium text-gray-700 mb-1">Description</label> <textarea id="categoryDescription" rows="3" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea> </div> <div class="mt-6 flex justify-end space-x-3"> <button type="button" id="cancelCategory" class="px-4 py-2 border rounded text-gray-700 hover:bg-gray-100">Cancel</button> <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">Save Category</button> </div> </form> </div> </div> </div> <!-- Add Supplier Modal --> <div id="addSupplierModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-md max-h-screen overflow-y-auto"> <div class="p-6"> <div class="flex justify-between items-center mb-4"> <h3 class="text-xl font-bold">Add New Supplier</h3> <button id="closeSupplierModal" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <form id="supplierForm"> <div class="grid grid-cols-1 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Supplier Name*</label> <input type="text" id="supplierName" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Contact Person*</label> <input type="text" id="supplierContact" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Phone Number*</label> <input type="text" id="supplierPhone" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Email</label> <input type="email" id="supplierEmail" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Address</label> <textarea id="supplierAddress" rows="2" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Products Supplied</label> <textarea id="supplierProducts" rows="2" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="List of products supplied by this supplier"></textarea> </div> </div> <div class="mt-6 flex justify-end space-x-3"> <button type="button" id="cancelSupplier" class="px-4 py-2 border rounded text-gray-700 hover:bg-gray-100">Cancel</button> <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">Save Supplier</button> </div> </form> </div> </div> </div> <!-- Add Sale Modal --> <div id="addSaleModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-screen overflow-y-auto"> <div class="p-6"> <div class="flex justify-between items-center mb-4"> <h3 class="text-xl font-bold">New Sale</h3> <button id="closeSaleModal" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <form id="saleForm"> <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Customer Name</label> <input type="text" id="saleCustomer" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Date*</label> <input type="date" id="saleDate" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required> </div> </div> <div class="mb-6"> <h4 class="text-lg font-semibold mb-3">Items</h4> <div class="overflow-x-auto"> <table class="min-w-full border"> <thead class="bg-gray-50"> <tr> <th class="px-4 py-2 text-left text-sm font-medium text-gray-500">Medicine</th> <th class="px-4 py-2 text-left text-sm font-medium text-gray-500">Batch</th> <th class="px-4 py-2 text-left text-sm font-medium text-gray-500">Price</th> <th class="px-4 py-2 text-left text-sm font-medium text-gray-500">Quantity</th> <th class="px-4 py-2 text-left text-sm font-medium text-gray-500">Total</th> <th class="px-4 py-2 text-left text-sm font-medium text-gray-500">Action</th> </tr> </thead> <tbody id="saleItems"> <tr> <td class="px-4 py-2 border"> <select class="w-full border rounded px-2 py-1"> <option> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PharmaCare - Inventory Management</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;
}
.notification-badge {
position: absolute;
top: -5px;
right: -5px;
background-color: #ef4444;
color: white;
border-radius: 50%;
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
}
.chart-container {
position: relative;
height: 300px;
}
.low-stock {
background-color: #fef2f2;
border-left: 4px solid #ef4444;
}
.expiring-soon {
background-color: #fffbeb;
border-left: 4px solid #f59e0b;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar bg-blue-800 text-white w-64 flex flex-col">
<div class="p-4 flex items-center justify-between border-b border-blue-700">
<div class="flex items-center">
<i class="fas fa-pills text-2xl mr-3"></i>
<span class="logo-text text-xl font-bold">PharmaCare</span>
</div>
<button id="toggleSidebar" class="text-white focus:outline-none">
<i class="fas fa-bars"></i>
</button>
</div>
<div class="p-4 border-b border-blue-700 flex items-center">
<div class="w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center mr-3">
<i class="fas fa-user"></i>
</div>
<div class="nav-text">
<div class="font-medium">Admin User</div>
<div class="text-xs text-blue-200">Administrator</div>
</div>
</div>
<nav class="flex-1 overflow-y-auto">
<div class="p-2">
<a href="#" class="dashboard-nav flex items-center p-3 rounded hover:bg-blue-700 text-white">
<i class="fas fa-tachometer-alt mr-3"></i>
<span class="nav-text">Dashboard</span>
</a>
<a href="#" class="inventory-nav flex items-center p-3 rounded hover:bg-blue-700 text-white">
<i class="fas fa-boxes mr-3"></i>
<span class="nav-text">Inventory</span>
</a>
<a href="#" class="medicines-nav flex items-center p-3 rounded hover:bg-blue-700 text-white">
<i class="fas fa-pills mr-3"></i>
<span class="nav-text">Medicines</span>
</a>
<a href="#" class="categories-nav flex items-center p-3 rounded hover:bg-blue-700 text-white">
<i class="fas fa-tags mr-3"></i>
<span class="nav-text">Categories</span>
</a>
<a href="#" class="suppliers-nav flex items-center p-3 rounded hover:bg-blue-700 text-white">
<i class="fas fa-truck mr-3"></i>
<span class="nav-text">Suppliers</span>