| | <!DOCTYPE html> |
| | <html lang="fr"> |
| | <head> |
| | <meta charset="UTF-8"> |
| | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | <title>Remorquage Pro - Modifier Client</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"> |
| | |
| | <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="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> |
| |
|
| | |
| | <div class="flex-1 flex flex-col overflow-hidden"> |
| | |
| | <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">Modifier Client</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> |
| |
|
| | |
| | <main class="flex-1 overflow-y-auto p-6 bg-gray-100"> |
| | <div class="max-w-3xl mx-auto bg-white rounded-lg shadow p-8" data-aos="fade-up"> |
| | <h2 class="text-xl font-semibold text-gray-800 mb-6">Modifier les informations du client</h2> |
| | <form class="space-y-6"> |
| | <div class="flex items-center space-x-4 mb-6"> |
| | <img src="http://static.photos/people/100x100/1" alt="Client" class="w-16 h-16 rounded-full"> |
| | <div> |
| | <h3 class="text-lg font-medium text-gray-900">Martin Dupont</h3> |
| | <p class="text-sm text-gray-500">Client depuis: 15/01/2023</p> |
| | </div> |
| | </div> |
| | <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Nom</label> |
| | <input type="text" value="Dupont" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Prénom</label> |
| | <input type="text" value="Martin" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Type de client</label> |
| | <select id="clientType" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | <option value="particulier" selected>Particulier</option> |
| | <option value="professionnel">Professionnel</option> |
| | <option value="assurance">Assurance</option> |
| | <option value="garage">Garage</option> |
| | </select> |
| | </div> |
| | </div> |
| |
|
| | <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Téléphone</label> |
| | <input type="tel" value="06 12 34 56 78" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Numéro de Sécurité Sociale</label> |
| | <input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" value="1 85 06 75 115 007 36"> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">N° Carte Vitale</label> |
| | <input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="1234567890123"> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Email</label> |
| | <input type="email" value="martin.dupont@email.com" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | </div> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Adresse</label> |
| | <input type="text" value="12 Rue de la Paix" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | </div> |
| | <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Code Postal</label> |
| | <input type="text" value="75000" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Ville</label> |
| | <input type="text" value="Paris" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Pays</label> |
| | <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | <option value="FR" selected>France</option> |
| | <option value="DE">Allemagne</option> |
| | <option value="BE">Belgique</option> |
| | <option value="LU">Luxembourg</option> |
| | <option value="CH">Suisse</option> |
| | <option value="ES">Espagne</option> |
| | <option value="IT">Italie</option> |
| | <option value="PT">Portugal</option> |
| | <option value="GB">Royaume-Uni</option> |
| | <option value="NL">Pays-Bas</option> |
| | <option value="AT">Autriche</option> |
| | <option value="IE">Irlande</option> |
| | <option value="DK">Danemark</option> |
| | <option value="SE">Suède</option> |
| | <option value="FI">Finlande</option> |
| | <option value="NO">Norvège</option> |
| | <option value="PL">Pologne</option> |
| | <option value="CZ">République Tchèque</option> |
| | <option value="HU">Hongrie</option> |
| | <option value="SK">Slovaquie</option> |
| | <option value="SI">Slovénie</option> |
| | <option value="GR">Grèce</option> |
| | <option value="RO">Roumanie</option> |
| | <option value="BG">Bulgarie</option> |
| | <option value="HR">Croatie</option> |
| | <option value="EE">Estonie</option> |
| | <option value="LV">Lettonie</option> |
| | <option value="LT">Lituanie</option> |
| | <option value="CY">Chypre</option> |
| | <option value="MT">Malte</option> |
| | <option value="other">Autre</option> |
| | </select> |
| | </div> |
| | </div> |
| | <div id="siretField" class="hidden"> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Numéro SIRET/RCS</label> |
| | <input type="text" id="siret" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> |
| | </div> |
| | <div> |
| | <label class="block text-sm font-medium text-gray-700 mb-1">Informations supplémentaires</label> |
| | <textarea rows="3" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">Client fidèle depuis plusieurs années</textarea> |
| | </div> |
| | |
| | <div class="mt-6"> |
| | <label class="block text-sm font-medium text-gray-700 mb-2">Documents joints</label> |
| | <div class="grid grid-cols-3 gap-4"> |
| | <div class="flex items-center p-3 border rounded-lg"> |
| | <i data-feather="file-text" class="h-6 w-6 text-blue-400 mr-3"></i> |
| | <div> |
| | <p class="text-sm font-medium truncate">Carte_identite.pdf</p> |
| | <p class="text-xs text-gray-500">1.2 MB</p> |
| | </div> |
| | <button class="ml-auto text-red-500 hover:text-red-700"> |
| | <i data-feather="trash-2" class="h-4 w-4"></i> |
| | </button> |
| | </div> |
| | <div class="flex items-center p-3 border rounded-lg"> |
| | <i data-feather="image" class="h-6 w-6 text-blue-400 mr-3"></i> |
| | <div> |
| | <p class="text-sm font-medium truncate">Carte_vitale.jpg</p> |
| | <p class="text-xs text-gray-500">0.8 MB</p> |
| | </div> |
| | <button class="ml-auto text-red-500 hover:text-red-700"> |
| | <i data-feather="trash-2" class="h-4 w-4"></i> |
| | </button> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | |
| | <div class="mt-6"> |
| | <label class="block text-sm font-medium text-gray-700 mb-2">Ajouter des documents</label> |
| | <div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-lg"> |
| | <div class="space-y-1 text-center"> |
| | <svg class="mx-auto h-12 w-12 text-gray-400" stroke="currentColor" fill="none" viewBox="0 0 48 48" aria-hidden="true"> |
| | <path d="M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> |
| | </svg> |
| | <div class="flex text-sm text-gray-600"> |
| | <label for="file-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-blue-600 hover:text-blue-500 focus-within:outline-none"> |
| | <span>Uploader un fichier</span> |
| | <input id="file-upload" name="file-upload" type="file" class="sr-only" multiple> |
| | </label> |
| | <p class="pl-1">ou glisser-déposer</p> |
| | </div> |
| | <p class="text-xs text-gray-500"> |
| | PNG, JPG, PDF, DOCX jusqu'à 10MB |
| | </p> |
| | </div> |
| | </div> |
| | <div id="file-list" class="mt-2 grid grid-cols-3 gap-4"></div> |
| | </div> |
| |
|
| | <div class="flex justify-end space-x-4 pt-4"> |
| | <a href="clients.html" class="px-6 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition duration-200"> |
| | Annuler |
| | </a> |
| | <button type="submit" class="px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition duration-200"> |
| | Enregistrer les modifications |
| | </button> |
| | </div> |
| | </form> |
| | </div> |
| | </main> |
| | </div> |
| |
|
| | <script> |
| | |
| | document.getElementById('menu-toggle').addEventListener('click', function() { |
| | document.getElementById('sidebar').classList.toggle('-translate-x-full'); |
| | }); |
| | |
| | |
| | const clientType = document.getElementById('clientType'); |
| | const siretField = document.getElementById('siretField'); |
| | |
| | clientType.addEventListener('change', function() { |
| | const selectedType = this.value; |
| | if (selectedType === 'professionnel' || selectedType === 'assurance' || selectedType === 'garage') { |
| | siretField.classList.remove('hidden'); |
| | document.getElementById('siret').required = true; |
| | } else { |
| | siretField.classList.add('hidden'); |
| | document.getElementById('siret').required = false; |
| | } |
| | }); |
| | |
| | document.querySelector('form').addEventListener('submit', function(e) { |
| | e.preventDefault(); |
| | |
| | |
| | const selectedType = clientType.value; |
| | const siretValue = document.getElementById('siret').value; |
| | |
| | if ((selectedType === 'professionnel' || selectedType === 'assurance' || selectedType === 'garage') && !siretValue) { |
| | alert('Le numéro SIRET/RCS est obligatoire pour les clients professionnels, assurances et garages'); |
| | return; |
| | } |
| | |
| | |
| | alert('Client modifié avec succès!'); |
| | window.location.href = 'clients.html'; |
| | }); |
| | </script> |
| | <script>AOS.init();</script> |
| | <script>feather.replace();</script> |
| | </body> |
| | </html> |