Spaces:
Configuration error
Configuration error
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Control Points - Patrol Control System</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen"> | |
| <!-- Sidebar --> | |
| <custom-sidebar></custom-sidebar> | |
| <!-- Header --> | |
| <custom-header></custom-header> | |
| <!-- Main Content --> | |
| <main class="ml-64 mt-16 p-6"> | |
| <div class="mb-6 flex justify-between items-center"> | |
| <div> | |
| <h1 class="text-2xl font-bold text-gray-800">Control Points Management</h1> | |
| <p class="text-gray-600">Configure and monitor all patrol control points</p> | |
| </div> | |
| <button class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg flex items-center shadow-sm"> | |
| <i data-feather="plus" class="mr-2 w-4 h-4"></i> | |
| Add New Point | |
| </button> | |
| </div> | |
| <!-- Filters --> | |
| <div class="bg-white rounded-xl shadow-sm p-6 mb-6"> | |
| <div class="grid grid-cols-1 md:grid-cols-5 gap-4"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Search</label> | |
| <div class="relative"> | |
| <input type="text" placeholder="Search points..." class="w-full pl-9 pr-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <i data-feather="search" class="absolute left-3 top-2.5 w-4 h-4 text-gray-400"></i> | |
| </div> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Status</label> | |
| <select class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <option>All Statuses</option> | |
| <option>Active</option> | |
| <option>Inactive</option> | |
| <option>Maintenance</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Type</label> | |
| <select class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <option>All Types</option> | |
| <option>NFC</option> | |
| <option>QR Code</option> | |
| <option>Manual</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Zone</label> | |
| <select class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <option>All Zones</option> | |
| <option>Zone A</option> | |
| <option>Zone B</option> | |
| <option>Zone C</option> | |
| </select> | |
| </div> | |
| <div class="flex items-end"> | |
| <button class="w-full bg-gray-100 hover:bg-gray-200 text-gray-800 font-medium py-2 px-4 rounded-lg flex items-center justify-center"> | |
| <i data-feather="refresh-ccw" class="w-4 h-4 mr-2"></i> | |
| Reset | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Control Points Grid --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> | |
| <control-point-card | |
| title="Entrée Principale" | |
| location="Bâtiment A - Rez-de-chaussée" | |
| type="NFC" | |
| status="Active" | |
| latitude="48.8566" | |
| longitude="2.3522" | |
| nfc-id="NFC-001"> | |
| </control-point-card> | |
| <control-point-card | |
| title="Salle des Serveurs" | |
| location="Bâtiment B - 3ème étage" | |
| type="QR" | |
| status="Maintenance" | |
| latitude="48.8584" | |
| longitude="2.3545"> | |
| </control-point-card> | |
| <control-point-card | |
| title="Parking" | |
| location="Extérieur - Côté Sud" | |
| type="Manual" | |
| status="Active" | |
| latitude="48.8575" | |
| longitude="2.3518"> | |
| </control-point-card> | |
| <control-point-card | |
| title="Porte Arrière" | |
| location="Bâtiment A - Arrière" | |
| type="NFC" | |
| status="Inactive" | |
| latitude="48.8569" | |
| longitude="2.3515" | |
| nfc-id="NFC-002"> | |
| </control-point-card> | |
| <control-point-card | |
| title="Réception" | |
| location="Hall d'accueil - Bâtiment A" | |
| type="QR" | |
| status="Active" | |
| latitude="48.8563" | |
| longitude="2.3528"> | |
| </control-point-card> | |
| <control-point-card | |
| title="Sortie d'Urgence" | |
| location="Bâtiment C - Aile Est" | |
| type="Manual" | |
| status="Active" | |
| latitude="48.8590" | |
| longitude="2.3550"> | |
| </control-point-card> | |
| <control-point-card | |
| title="Entrepôt" | |
| location="Zone de stockage - Aile Nord" | |
| type="NFC" | |
| status="Active" | |
| latitude="48.8578" | |
| longitude="2.3505" | |
| nfc-id="NFC-003"> | |
| </control-point-card> | |
| <control-point-card | |
| title="Salle de Conférence" | |
| location="Bâtiment B - 2ème étage" | |
| type="QR" | |
| status="Maintenance" | |
| latitude="48.8581" | |
| longitude="2.3540"> | |
| </control-point-card> | |
| <control-point-card | |
| title="Quai de Chargement" | |
| location="Entrée de Service" | |
| type="Manual" | |
| status="Active" | |
| latitude="48.8572" | |
| longitude="2.3498"> | |
| </control-point-card> | |
| </div> | |
| <!-- Pagination --> | |
| <div class="mt-8 flex justify-between items-center"> | |
| <div class="text-sm text-gray-600"> | |
| Showing 1 to 9 of 86 entries | |
| </div> | |
| <nav class="flex items-center space-x-2"> | |
| <a href="#" class="px-3 py-1 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700">Previous</a> | |
| <a href="#" class="px-3 py-1 rounded-lg bg-blue-600 text-white">1</a> | |
| <a href="#" class="px-3 py-1 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700">2</a> | |
| <a href="#" class="px-3 py-1 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700">3</a> | |
| <span class="px-3 py-1 text-gray-500">...</span> | |
| <a href="#" class="px-3 py-1 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700">9</a> | |
| <a href="#" class="px-3 py-1 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700">Next</a> | |
| </nav> | |
| </div> | |
| </main> | |
| <script src="components/sidebar.js"></script> | |
| <script src="components/header.js"></script> | |
| <script src="components/control-point-card.js"></script> | |
| <script type="module" src="script.js"></script> | |
| <script> | |
| feather.replace(); | |
| // Add event listeners for control point cards | |
| document.addEventListener('edit-point', (e) => { | |
| console.log('Edit point:', e.detail); | |
| // Redirect to edit page or open modal | |
| window.location.href = `point-detail.html?id=${encodeURIComponent(e.detail.title)}`; | |
| }); | |
| document.addEventListener('show-on-map', (e) => { | |
| console.log('Show on map:', e.detail); | |
| if (e.detail.latitude && e.detail.longitude) { | |
| // Open map view or redirect to map page | |
| const url = `https://www.google.com/maps?q=${e.detail.latitude},${e.detail.longitude}`; | |
| window.open(url, '_blank'); | |
| } | |
| }); | |
| document.addEventListener('nfc-success', (e) => { | |
| console.log('NFC scan successful:', e.detail); | |
| // Show success notification | |
| const notification = document.createElement('div'); | |
| notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg z-50'; | |
| notification.innerHTML = ` | |
| <div class="flex items-center"> | |
| <i data-feather="check-circle" class="w-5 h-5 mr-2"></i> | |
| <span>Point de contrôle vérifié avec succès!</span> | |
| </div> | |
| `; | |
| document.body.appendChild(notification); | |
| feather.replace(); | |
| setTimeout(() => { | |
| notification.remove(); | |
| }, 3000); | |
| }); | |
| // Add "Add New Point" button functionality | |
| document.querySelector('[data-feather="plus"]').closest('button').addEventListener('click', () => { | |
| // Redirect to add point form or open modal | |
| console.log('Add new point clicked'); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |