Spaces:
Running
Running
Ok lets make our first page when I click the suppliers buton in purchasing I need it to take me to a table where I have the suppliers list and all the crud operation with the search filter and all table oprations and an export button
58c02f4 verified | <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Dashboard | EUROHINCA Business Hub</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| } | |
| .sidebar { | |
| transition: all 0.3s ease; | |
| } | |
| .card { | |
| background: rgba(255, 255, 255, 0.05); | |
| backdrop-filter: blur(5px); | |
| border-radius: 12px; | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| } | |
| .nav-link { | |
| transition: all 0.2s ease; | |
| } | |
| .nav-link:hover { | |
| background: rgba(255, 255, 255, 0.05); | |
| } | |
| .nav-link.active { | |
| background: rgba(59, 130, 246, 0.2); | |
| border-left: 3px solid #3b82f6; | |
| } | |
| .rotate-180 { | |
| transform: rotate(180deg); | |
| } | |
| .kpi-card { | |
| transition: all 0.3s ease; | |
| } | |
| .kpi-card:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-white flex"> | |
| <!-- Sidebar --> | |
| <div class="sidebar w-64 bg-gray-800 h-screen fixed transform -translate-x-64 lg:translate-x-0 transition-transform duration-300 z-50" id="sidebar"> | |
| <div class="p-4 border-b border-gray-700"> | |
| <div class="flex items-center space-x-2"> | |
| <i data-feather="briefcase" class="text-blue-300"></i> | |
| <span class="text-lg font-semibold">EUROHINCA Hub</span> | |
| </div> | |
| </div> | |
| <div class="p-4"> | |
| <div class="mb-6"> | |
| <div class="flex items-center space-x-3 mb-4"> | |
| <div class="w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center"> | |
| <span class="font-medium">JD</span> | |
| </div> | |
| <div> | |
| <p class="font-medium">John Doe</p> | |
| <p class="text-xs text-gray-400">Purchase Department</p> | |
| </div> | |
| </div> | |
| <button class="w-full text-left px-3 py-2 text-sm rounded-lg bg-blue-600 hover:bg-blue-500 transition"> | |
| <i data-feather="user" class="w-4 h-4 inline mr-2"></i> | |
| My Profile | |
| </button> | |
| </div> | |
| <nav class="space-y-1"> | |
| <a href="#" class="nav-link active block px-3 py-2 text-sm rounded-lg"> | |
| <i data-feather="home" class="w-4 h-4 inline mr-2"></i> | |
| Dashboard | |
| </a> | |
| <div class="relative"> | |
| <button class="nav-link w-full text-left px-3 py-2 text-sm rounded-lg flex items-center justify-between purchasing-menu-toggle"> | |
| <span class="flex items-center"> | |
| <i data-feather="shopping-cart" class="w-4 h-4 inline mr-2"></i> | |
| Purchasing | |
| </span> | |
| <i data-feather="chevron-down" class="w-4 h-4 transition-transform duration-200 purchasing-menu-icon"></i> | |
| </button> | |
| <div class="mt-1 ml-6 hidden submenu"> | |
| <a href="suppliers.html" class="nav-link block px-3 py-2 text-sm rounded-lg"> | |
| <i data-feather="users" class="w-4 h-4 inline mr-2"></i> | |
| Suppliers | |
| </a> | |
| <a href="#" class="nav-link block px-3 py-2 text-sm rounded-lg"> | |
| <i data-feather="file-text" class="w-4 h-4 inline mr-2"></i> | |
| Purchase Orders | |
| </a> | |
| </div> | |
| </div> | |
| <a href="#" class="nav-link block px-3 py-2 text-sm rounded-lg"> | |
| <i data-feather="truck" class="w-4 h-4 inline mr-2"></i> | |
| Logistics | |
| </a> | |
| <a href="#" class="nav-link block px-3 py-2 text-sm rounded-lg"> | |
| <i data-feather="dollar-sign" class="w-4 h-4 inline mr-2"></i> | |
| Finance | |
| </a> | |
| <a href="#" class="nav-link block px-3 py-2 text-sm rounded-lg"> | |
| <i data-feather="file-text" class="w-4 h-4 inline mr-2"></i> | |
| Documents | |
| </a> | |
| <a href="#" class="nav-link block px-3 py-2 text-sm rounded-lg"> | |
| <i data-feather="settings" class="w-4 h-4 inline mr-2"></i> | |
| Settings | |
| </a> | |
| </nav> | |
| </div> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="flex-1 lg:ml-64"> | |
| <!-- Top Navigation --> | |
| <header class="bg-gray-800 p-4 flex justify-between items-center border-b border-gray-700"> | |
| <div class="flex items-center space-x-2"> | |
| <button class="lg:hidden" id="sidebarToggle"> | |
| <i data-feather="menu" class="w-5 h-5"></i> | |
| </button> | |
| <h1 class="text-xl font-semibold">Dashboard</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <div class="relative"> | |
| <input type="text" placeholder="Search..." class="bg-gray-700 px-4 py-2 rounded-lg pl-10 focus:outline-none focus:ring-1 focus:ring-blue-500"> | |
| <i data-feather="search" class="absolute left-3 top-2.5 text-gray-400"></i> | |
| </div> | |
| <button class="p-2 rounded-full hover:bg-gray-700"> | |
| <i data-feather="bell" class="w-5 h-5"></i> | |
| </button> | |
| <a href="login.html" class="p-2 rounded-full hover:bg-gray-700"> | |
| <i data-feather="log-out" class="w-5 h-5"></i> | |
| </a> | |
| </div> | |
| </header> | |
| <!-- Dashboard Content --> | |
| <main class="p-4 lg:p-6"> | |
| <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-6 mb-4 sm:mb-6"> | |
| <div class="kpi-card card p-6"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-sm text-gray-400">Total POs</p> | |
| <h3 class="text-2xl font-bold mt-1">142</h3> | |
| </div> | |
| <div class="p-2 rounded-lg bg-blue-500 bg-opacity-20"> | |
| <i data-feather="file-text" class="w-5 h-5 text-blue-300"></i> | |
| </div> | |
| </div> | |
| <p class="text-xs text-green-400 mt-2">+12% from last month</p> | |
| </div> | |
| <div class="kpi-card card p-6"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-sm text-gray-400">Pending Approval</p> | |
| <h3 class="text-2xl font-bold mt-1">23</h3> | |
| </div> | |
| <div class="p-2 rounded-lg bg-yellow-500 bg-opacity-20"> | |
| <i data-feather="clock" class="w-5 h-5 text-yellow-300"></i> | |
| </div> | |
| </div> | |
| <p class="text-xs text-red-400 mt-2">-5% from last month</p> | |
| </div> | |
| <div class="kpi-card card p-6"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-sm text-gray-400">Active Suppliers</p> | |
| <h3 class="text-2xl font-bold mt-1">87</h3> | |
| </div> | |
| <div class="p-2 rounded-lg bg-green-500 bg-opacity-20"> | |
| <i data-feather="users" class="w-5 h-5 text-green-300"></i> | |
| </div> | |
| </div> | |
| <p class="text-xs text-green-400 mt-2">+8% from last month</p> | |
| </div> | |
| <div class="kpi-card card p-6"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-sm text-gray-400">Pending Invoices</p> | |
| <h3 class="text-2xl font-bold mt-1">45</h3> | |
| </div> | |
| <div class="p-2 rounded-lg bg-purple-500 bg-opacity-20"> | |
| <i data-feather="dollar-sign" class="w-5 h-5 text-purple-300"></i> | |
| </div> | |
| </div> | |
| <p class="text-xs text-yellow-400 mt-2">No change</p> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-3 sm:gap-6"> | |
| <div class="lg:col-span-2"> | |
| <div class="card p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-lg font-semibold">Recent Purchase Orders</h2> | |
| <button class="text-sm text-blue-400 hover:text-blue-300">View All</button> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="w-full"> | |
| <thead> | |
| <tr class="text-left text-sm text-gray-400 border-b border-gray-700"> | |
| <th class="pb-2">PO Number</th> | |
| <th class="pb-2">Supplier</th> | |
| <th class="pb-2">Amount</th> | |
| <th class="pb-2">Status</th> | |
| <th class="pb-2">Date</th> | |
| </tr> | |
| </thead> | |
| <tbody class="divide-y divide-gray-700 text-sm"> | |
| <tr> | |
| <td class="py-3"><a href="#" class="text-blue-400 hover:underline">PO-2023-142</a></td> | |
| <td>ABC Supplies</td> | |
| <td>€12,345.00</td> | |
| <td><span class="px-2 py-1 rounded-full text-xs bg-green-900 text-green-300">Approved</span></td> | |
| <td>15 Nov 2023</td> | |
| </tr> | |
| <tr> | |
| <td class="py-3"><a href="#" class="text-blue-400 hover:underline">PO-2023-141</a></td> | |
| <td>XYZ Imports</td> | |
| <td>€8,765.00</td> | |
| <td><span class="px-2 py-1 rounded-full text-xs bg-yellow-900 text-yellow-300">Pending</span></td> | |
| <td>14 Nov 2023</td> | |
| </tr> | |
| <tr> | |
| <td class="py-3"><a href="#" class="text-blue-400 hover:underline">PO-2023-140</a></td> | |
| <td>Global Parts</td> | |
| <td>€15,820.00</td> | |
| <td><span class="px-2 py-1 rounded-full text-xs bg-blue-900 text-blue-300">Validated</span></td> | |
| <td>13 Nov 2023</td> | |
| </tr> | |
| <tr> | |
| <td class="py-3"><a href="#" class="text-blue-400 hover:underline">PO-2023-139</a></td> | |
| <td>EuroTech</td> | |
| <td>€5,430.00</td> | |
| <td><span class="px-2 py-1 rounded-full text-xs bg-green-900 text-green-300">Approved</span></td> | |
| <td>12 Nov 2023</td> | |
| </tr> | |
| <tr> | |
| <td class="py-3"><a href="#" class="text-blue-400 hover:underline">PO-2023-138</a></td> | |
| <td>Maroc Logistics</td> | |
| <td>€9,876.00</td> | |
| <td><span class="px-2 py-1 rounded-full text-xs bg-red-900 text-red-300">Rejected</span></td> | |
| <td>10 Nov 2023</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| <div> | |
| <div class="card p-6 h-full"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-lg font-semibold">Quick Actions</h2> | |
| </div> | |
| <div class="space-y-3"> | |
| <button class="w-full text-left px-4 py-3 rounded-lg bg-blue-600 hover:bg-blue-500 transition flex items-center"> | |
| <i data-feather="file-plus" class="w-5 h-5 mr-3"></i> | |
| Create New PO | |
| </button> | |
| <button class="w-full text-left px-4 py-3 rounded-lg bg-gray-700 hover:bg-gray-600 transition flex items-center"> | |
| <i data-feather="upload" class="w-5 h-5 mr-3"></i> | |
| Upload Document | |
| </button> | |
| <button class="w-full text-left px-4 py-3 rounded-lg bg-gray-700 hover:bg-gray-600 transition flex items-center"> | |
| <i data-feather="user-plus" class="w-5 h-5 mr-3"></i> | |
| Add Supplier | |
| </button> | |
| <button class="w-full text-left px-4 py-3 rounded-lg bg-gray-700 hover:bg-gray-600 transition flex items-center"> | |
| <i data-feather="search" class="w-5 h-5 mr-3"></i> | |
| Search Invoices | |
| </button> | |
| </div> | |
| <div class="mt-8"> | |
| <h3 class="text-sm font-medium mb-3">Recent Documents</h3> | |
| <div class="space-y-2"> | |
| <a href="#" class="flex items-center justify-between p-2 hover:bg-gray-800 rounded-lg"> | |
| <div class="flex items-center"> | |
| <i data-feather="file-text" class="w-4 h-4 text-gray-400 mr-2"></i> | |
| <span>Invoice_2023_11_15.pdf</span> | |
| </div> | |
| <span class="text-xs text-gray-400">15 Nov</span> | |
| </a> | |
| <a href="#" class="flex items-center justify-between p-2 hover:bg-gray-800 rounded-lg"> | |
| <div class="flex items-center"> | |
| <i data-feather="file-text" class="w-4 h-4 text-gray-400 mr-2"></i> | |
| <span>PO_142_Approval.docx</span> | |
| </div> | |
| <span class="text-xs text-gray-400">14 Nov</span> | |
| </a> | |
| <a href="#" class="flex items-center justify-between p-2 hover:bg-gray-800 rounded-lg"> | |
| <div class="flex items-center"> | |
| <i data-feather="file-text" class="w-4 h-4 text-gray-400 mr-2"></i> | |
| <span>Supplier_Contract_XYZ.pdf</span> | |
| </div> | |
| <span class="text-xs text-gray-400">12 Nov</span> | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| // Toggle sidebar on mobile | |
| const sidebar = document.getElementById('sidebar'); | |
| const sidebarToggle = document.getElementById('sidebarToggle'); | |
| sidebarToggle.addEventListener('click', () => { | |
| sidebar.classList.toggle('-translate-x-64'); | |
| }); | |
| // Toggle purchasing submenu | |
| const purchasingMenuToggle = document.querySelector('.purchasing-menu-toggle'); | |
| const purchasingMenuIcon = document.querySelector('.purchasing-menu-icon'); | |
| const submenu = document.querySelector('.submenu'); | |
| purchasingMenuToggle.addEventListener('click', (e) => { | |
| e.stopPropagation(); | |
| e.preventDefault(); | |
| submenu.classList.toggle('hidden'); | |
| purchasingMenuIcon.classList.toggle('rotate-180'); | |
| }); | |
| // Close sidebar and submenu when clicking outside | |
| document.addEventListener('click', (e) => { | |
| if (window.innerWidth < 1024 && | |
| !sidebar.contains(e.target) && | |
| !sidebarToggle.contains(e.target)) { | |
| sidebar.classList.add('-translate-x-64'); | |
| } | |
| // Close submenu if clicking outside | |
| if (!purchasingMenuToggle.contains(e.target) && !submenu.contains(e.target)) { | |
| submenu.classList.add('hidden'); | |
| purchasingMenuIcon.classList.remove('rotate-180'); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> | |