Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Bank Management - ChipFlow Commander</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| </head> | |
| <body class="bg-gray-100"> | |
| <div class="flex h-screen"> | |
| <!-- Sidebar --> | |
| <div class="w-64 bg-gray-800 text-white"> | |
| <div class="p-4 border-b border-gray-700"> | |
| <h1 class="text-xl font-bold">ChipFlow Commander</h1> | |
| <p class="text-sm text-gray-400">Bank Management</p> | |
| </div> | |
| <nav class="mt-4"> | |
| <a href="admin_dashboard.html" class="block py-2 px-4 text-gray-300 hover:bg-gray-700">Dashboard</a> | |
| <a href="bank_management.html" class="block py-2 px-4 bg-gray-700 text-white">Bank Management</a> | |
| <a href="id_management.html" class="block py-2 px-4 text-gray-300 hover:bg-gray-700">ID Management</a> | |
| <a href="transactions.html" class="block py-2 px-4 text-gray-300 hover:bg-gray-700">Transactions</a> | |
| <a href="history.html" class="block py-2 px-4 text-gray-300 hover:bg-gray-700">History Log</a> | |
| <a href="/index.html" class="block py-2 px-4 text-gray-300 hover:bg-gray-700 mt-8">Logout</a> | |
| </nav> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="flex-1 overflow-auto"> | |
| <header class="bg-white shadow-sm p-4"> | |
| <div class="flex justify-between items-center"> | |
| <h2 class="text-xl font-semibold text-gray-800">Bank Accounts</h2> | |
| <button id="addBankBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg"> | |
| Add New Bank | |
| </button> | |
| </div> | |
| </header> | |
| <main class="p-6"> | |
| <div class="bg-white rounded-lg shadow overflow-hidden"> | |
| <div class="p-4 border-b border-gray-200 flex justify-between items-center"> | |
| <h3 class="text-lg font-medium text-gray-800">Bank List</h3> | |
| <div class="relative"> | |
| <input type="text" placeholder="Search banks..." class="pl-8 pr-4 py-2 border rounded-lg w-64"> | |
| <i data-feather="search" class="absolute left-3 top-2.5 text-gray-400"></i> | |
| </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">Bank Name</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Account Number</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Account Name</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Balance</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 class="bg-white divide-y divide-gray-200"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap">BCA</td> | |
| <td class="px-6 py-4 whitespace-nowrap">1234567890</td> | |
| <td class="px-6 py-4 whitespace-nowrap">John Doe</td> | |
| <td class="px-6 py-4 whitespace-nowrap">Rp 15,000,000</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">Active</span> | |
| </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">Deactivate</button> | |
| </td> | |
| </tr> | |
| <!-- More rows would be dynamically inserted here --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| </div> | |
| <!-- Add Bank Modal --> | |
| <div id="addBankModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden"> | |
| <div class="bg-white rounded-lg shadow-lg p-6 w-full max-w-md"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-lg font-medium text-gray-800">Add New Bank</h3> | |
| <button id="closeModalBtn" class="text-gray-400 hover:text-gray-500"> | |
| <i data-feather="x"></i> | |
| </button> | |
| </div> | |
| <form id="bankForm"> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2">Bank Name</label> | |
| <input type="text" name="bankName" class="w-full px-4 py-2 border rounded-lg" required> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2">Account Number</label> | |
| <input type="text" name="accountNumber" class="w-full px-4 py-2 border rounded-lg" required> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2">Account Name</label> | |
| <input type="text" name="accountName" class="w-full px-4 py-2 border rounded-lg" required> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block text-gray-700 mb-2">Initial Balance</label> | |
| <input type="number" name="initialBalance" class="w-full px-4 py-2 border rounded-lg" value="0" min="0"> | |
| </div> | |
| <div class="flex justify-end space-x-3 mt-6"> | |
| <button type="button" id="cancelBankBtn" class="px-4 py-2 border rounded-lg text-gray-700 hover:bg-gray-100"> | |
| Cancel | |
| </button> | |
| <button type="submit" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg"> | |
| Save Bank | |
| </button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| // Modal handling | |
| document.getElementById('addBankBtn').addEventListener('click', function() { | |
| document.getElementById('addBankModal').classList.remove('hidden'); | |
| }); | |
| document.getElementById('closeModalBtn').addEventListener('click', function() { | |
| document.getElementById('addBankModal').classList.add('hidden'); | |
| }); | |
| document.getElementById('cancelBankBtn').addEventListener('click', function() { | |
| document.getElementById('addBankModal').classList.add('hidden'); | |
| }); | |
| // Form submission | |
| document.getElementById('bankForm').addEventListener('submit', async function(e) { | |
| e.preventDefault(); | |
| // Here you would handle the form submission via API | |
| // After successful submission: | |
| document.getElementById('addBankModal').classList.add('hidden'); | |
| // Then refresh the bank list | |
| }); | |
| </script> | |
| </body> | |
| </html> |