patrol-control-system / agents.html
secutorpro's picture
en mes a jour se systeme pour l'instaler dans guhub et supabase
96d812c verified
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Agents - Contrôle de Patrouille</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="flex justify-between items-center mb-6">
<div>
<h1 class="text-2xl font-bold text-gray-800">Agents de Sécurité Pro Ltd</h1>
<p class="text-gray-600">Gérez les agents de cette entreprise</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" id="addAgentBtn">
<i data-feather="plus" class="mr-2 w-4 h-4"></i>
Ajouter un agent
</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">Recherche</label>
<div class="relative">
<input type="text" placeholder="Rechercher des agents..." 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">Statut</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>Tous les statuts</option>
<option>Actif</option>
<option>Inactif</option>
<option>Congé</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Poste</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>Tous les postes</option>
<option>Officier de sécurité</option>
<option>Agent de sécurité</option>
<option>Superviseur</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Équipe</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>Toutes les équipes</option>
<option>Équipe A</option>
<option>Équipe B</option>
<option>Équipe 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>
Réinitialiser
</button>
</div>
</div>
</div>
<!-- Agents List -->
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Agent</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Contact</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Statut</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Affectation</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Disponibilité</th>
<th scope="col" 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">
<div class="flex items-center">
<div class="bg-gray-200 border-2 border-dashed rounded-xl w-8 h-8 mr-2"></div>
<div>
<div class="text-sm font-medium text-gray-900">Jean Dupont</div>
<div class="text-sm text-gray-500">ID: AGT-001</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">jean.dupont@email.com</div>
<div class="text-sm text-gray-500">+33 1 23 45 67 89</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
Actif
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Zone A - Équipe 1
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Disponible aujourd'hui
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">Voir</a>
<a href="#" class="ml-3 text-indigo-600 hover:text-indigo-900">Modifier</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="bg-gray-200 border-2 border-dashed rounded-xl w-8 h-8 mr-2"></div>
<div>
<div class="text-sm font-medium text-gray-900">Marie Dubois</div>
<div class="text-sm text-gray-500">ID: AGT-002</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">marie.dubois@email.com</div>
<div class="text-sm text-gray-500">+33 1 23 45 67 90</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-amber-100 text-amber-800">
Congé
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Zone B - Équipe 2
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Retour le 15 mars
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">Voir</a>
<a href="#" class="ml-3 text-indigo-600 hover:text-indigo-900">Modifier</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="bg-gray-200 border-2 border-dashed rounded-xl w-8 h-8 mr-2"></div>
<div>
<div class="text-sm font-medium text-gray-900">Pierre Martin</div>
<div class="text-sm text-gray-500">ID: AGT-003</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">pierre.martin@email.com</div>
<div class="text-sm text-gray-500">+33 1 23 45 67 91</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
Actif
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Toutes zones - Supervision
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Disponible
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">Voir</a>
<a href="#" class="ml-3 text-indigo-600 hover:text-indigo-900">Modifier</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="bg-gray-200 border-2 border-dashed rounded-xl w-8 h-8 mr-2"></div>
<div>
<div class="text-sm font-medium text-gray-900">Sophie Lambert</div>
<div class="text-sm text-gray-500">ID: AGT-004</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">sophie.lambert@email.com</div>
<div class="text-sm text-gray-500">+33 1 23 45 67 92</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
Actif
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Zone C - Équipe 3
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
Disponible demain
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">Voir</a>
<a href="#" class="ml-3 text-indigo-600 hover:text-indigo-900">Modifier</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Pagination -->
<div class="mt-8 flex justify-between items-center">
<div class="text-sm text-gray-600">
Affichage de 1 à 4 sur 24 entrées
</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">Précédent</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">6</a>
<a href="#" class="px-3 py-1 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700">Suivant</a>
</nav>
</div>
</main>
<!-- Add Agent Modal -->
<div class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden" id="addAgentModal">
<div class="bg-white rounded-xl shadow-lg w-full max-w-md">
<div class="border-b border-gray-200 px-6 py-4">
<h3 class="text-lg font-semibold text-gray-800">Ajouter un agent</h3>
</div>
<div class="p-6">
<form>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Nom complet</label>
<input type="text" 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" placeholder="Nom de l'agent">
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" 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" placeholder="Email de l'agent">
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Téléphone</label>
<input type="tel" 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" placeholder="Numéro de téléphone">
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Poste</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>Officier de sécurité</option>
<option>Agent de sécurité</option>
<option>Superviseur</option>
</select>
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Équipe</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>Équipe A</option>
<option>Équipe B</option>
<option>Équipe C</option>
</select>
</div>
</form>
</div>
<div class="border-t border-gray-200 px-6 py-4 flex justify-end space-x-3">
<button class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50" id="closeAgentModalBtn">Annuler</button>
<button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">Ajouter</button>
</div>
</div>
</div>
<script src="components/sidebar.js"></script>
<script src="components/header.js"></script>
<script type="module" src="script.js"></script>
<script>
feather.replace();
// Modal functionality
const addAgentBtn = document.getElementById('addAgentBtn');
const closeAgentModalBtn = document.getElementById('closeAgentModalBtn');
const addAgentModal = document.getElementById('addAgentModal');
addAgentBtn.addEventListener('click', () => {
addAgentModal.classList.remove('hidden');
});
closeAgentModalBtn.addEventListener('click', () => {
addAgentModal.classList.add('hidden');
});
// Close modal when clicking outside
window.addEventListener('click', (event) => {
if (event.target === addAgentModal) {
addAgentModal.classList.add('hidden');
}
});
</script>
</body>
</html>