dashboard / clients.html
depan724's picture
il faut ajouter "rechercher" dans le menu de "client" et activer l'option rechercher
b0e8ec1 verified
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Remorquage Pro - Clients</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.sidebar {
transition: all 0.3s ease;
}
.active-menu {
background-color: #3B82F6;
color: white;
}
</style>
</head>
<body class="bg-gray-100 flex h-screen">
<!-- Sidebar -->
<div class="sidebar bg-blue-800 text-white w-64 space-y-6 py-7 px-2 absolute inset-y-0 left-0 transform -translate-x-full md:relative md:translate-x-0 transition duration-200 ease-in-out" id="sidebar">
<div class="text-white flex items-center space-x-2 px-4">
<i data-feather="truck" class="h-8 w-8"></i>
<span class="text-2xl font-extrabold">Remorquage Pro</span>
</div>
<nav>
<a href="index.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
<i data-feather="home"></i>
<span>Dashboard</span>
</a>
<a href="clients.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
<i data-feather="users"></i>
<span>Clients</span>
</a>
<a href="rechercher-client.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 active-menu">
<i data-feather="search"></i>
<span>Rechercher</span>
</a>
<a href="employes.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
<i data-feather="user-check"></i>
<span>Employés</span>
</a>
<a href="vehicules.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
<i data-feather="truck"></i>
<span>Véhicules</span>
</a>
<a href="missions.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
<i data-feather="map-pin"></i>
<span>Missions</span>
</a>
<a href="assurances.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
<i data-feather="shield"></i>
<span>Assurances</span>
</a>
<a href="reglements.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
<i data-feather="credit-card"></i>
<span>Règlements</span>
</a>
<a href="rapports.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
<i data-feather="bar-chart-2"></i>
<span>Rapports</span>
</a>
</nav>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="flex items-center justify-between p-4">
<div class="flex items-center">
<button id="menu-toggle" class="text-gray-500 focus:outline-none md:hidden">
<i data-feather="menu"></i>
</button>
<h1 class="text-2xl font-semibold text-gray-800 ml-4">Gestion des Clients</h1>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<i data-feather="bell" class="text-gray-500"></i>
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
</div>
<div class="flex items-center">
<img src="http://static.photos/people/40x40/10" alt="Profile" class="h-10 w-10 rounded-full">
<span class="ml-2 text-gray-700">Admin</span>
</div>
</div>
</div>
</header>
<!-- Content -->
<main class="flex-1 overflow-y-auto p-6 bg-gray-100">
<!-- Actions Bar -->
<div class="flex justify-between items-center mb-6">
<div class="relative">
<input type="text" placeholder="Rechercher un client..." class="pl-10 pr-4 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 text-gray-400"></i>
</div>
<a href="nouveau-client.html" class="bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center space-x-2 hover:bg-blue-700 transition duration-200">
<i data-feather="plus"></i>
<span>Nouveau Client</span>
</a>
</div>
<!-- Clients Table -->
<div class="bg-white rounded-lg shadow overflow-hidden" data-aos="fade-up">
<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">Nom</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Télé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">Adresse</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Missions</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">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/40x40/1" alt="Martin Dupont">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Martin Dupont</div>
<div class="text-sm text-gray-500">Particulier</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">06 12 34 56 78</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">martin.dupont@email.com</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">12 Rue de la Paix, Paris</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-blue-100 text-blue-800">15 missions</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="modifier-client.html" class="text-blue-600 hover:text-blue-900 mr-3">Modifier</a>
<button class="text-red-600 hover:text-red-900">Supprimer</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/40x40/2" alt="Assurance AXA">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Assurance AXA</div>
<div class="text-sm text-gray-500">Professionnel</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">01 42 86 95 32</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">contact@axa.fr</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">25 Av. des Champs-Élysées, Paris</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-blue-100 text-blue-800">42 missions</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="modifier-client.html" class="text-blue-600 hover:text-blue-900 mr-3">Modifier</a>
<button class="text-red-600 hover:text-red-900">Supprimer</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/40x40/3" alt="Sophie Lambert">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Sophie Lambert</div>
<div class="text-sm text-gray-500">Particulier</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">07 65 43 21 09</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">sophie.lambert@email.com</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">8 Rue du Commerce, Lyon</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-blue-100 text-blue-800">8 missions</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="modifier-client.html" class="text-blue-600 hover:text-blue-900 mr-3">Modifier</a>
<button class="text-red-600 hover:text-red-900">Supprimer</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/40x40/4" alt="Garage AutoPlus">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Garage AutoPlus</div>
<div class="text-sm text-gray-500">Professionnel</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">04 78 65 43 21</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">contact@autoplus.fr</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">15 Bd de la République, Marseille</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-blue-100 text-blue-800">27 missions</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="modifier-client.html" class="text-blue-600 hover:text-blue-900 mr-3">Modifier</a>
<button class="text-red-600 hover:text-red-900">Supprimer</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
</div>
<script>
// Toggle sidebar on mobile
document.getElementById('menu-toggle').addEventListener('click', function() {
document.getElementById('sidebar').classList.toggle('-translate-x-full');
});
// Enhanced Search functionality
const searchInput = document.querySelector('input[placeholder="Rechercher un client..."]');
const searchRows = document.querySelectorAll('tbody tr');
searchInput.addEventListener('input', function(e) {
const searchTerm = e.target.value.toLowerCase().trim();
searchRows.forEach(row => {
const cells = row.querySelectorAll('td');
let found = false;
cells.forEach(cell => {
if (cell.textContent.toLowerCase().includes(searchTerm)) {
found = true;
}
});
row.style.display = found ? '' : 'none';
});
});
</script>
<script>AOS.init();</script>
<script>feather.replace();</script>
</body>
</html>