il faut que tu créée et active la partie nouveau véhicule
Browse files- clients.html +2 -2
- employes.html +1 -1
- missions.html +1 -1
- nouveau-vehicule.html +300 -0
- rapports.html +1 -1
- reglements.html +1 -1
clients.html
CHANGED
|
@@ -40,11 +40,11 @@
|
|
| 40 |
<i data-feather="user-check"></i>
|
| 41 |
<span>Employés</span>
|
| 42 |
</a>
|
| 43 |
-
<a href="vehicules.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 44 |
<i data-feather="truck"></i>
|
| 45 |
<span>Véhicules</span>
|
| 46 |
</a>
|
| 47 |
-
|
| 48 |
<i data-feather="map-pin"></i>
|
| 49 |
<span>Missions</span>
|
| 50 |
</a>
|
|
|
|
| 40 |
<i data-feather="user-check"></i>
|
| 41 |
<span>Employés</span>
|
| 42 |
</a>
|
| 43 |
+
<a href="vehicules.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 44 |
<i data-feather="truck"></i>
|
| 45 |
<span>Véhicules</span>
|
| 46 |
</a>
|
| 47 |
+
<a href="missions.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 48 |
<i data-feather="map-pin"></i>
|
| 49 |
<span>Missions</span>
|
| 50 |
</a>
|
employes.html
CHANGED
|
@@ -44,7 +44,7 @@
|
|
| 44 |
<i data-feather="truck"></i>
|
| 45 |
<span>Véhicules</span>
|
| 46 |
</a>
|
| 47 |
-
|
| 48 |
<i data-feather="map-pin"></i>
|
| 49 |
<span>Missions</span>
|
| 50 |
</a>
|
|
|
|
| 44 |
<i data-feather="truck"></i>
|
| 45 |
<span>Véhicules</span>
|
| 46 |
</a>
|
| 47 |
+
<a href="missions.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 48 |
<i data-feather="map-pin"></i>
|
| 49 |
<span>Missions</span>
|
| 50 |
</a>
|
missions.html
CHANGED
|
@@ -44,7 +44,7 @@
|
|
| 44 |
<i data-feather="truck"></i>
|
| 45 |
<span>Véhicules</span>
|
| 46 |
</a>
|
| 47 |
-
|
| 48 |
<i data-feather="map-pin"></i>
|
| 49 |
<span>Missions</span>
|
| 50 |
</a>
|
|
|
|
| 44 |
<i data-feather="truck"></i>
|
| 45 |
<span>Véhicules</span>
|
| 46 |
</a>
|
| 47 |
+
<a href="missions.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 active-menu">
|
| 48 |
<i data-feather="map-pin"></i>
|
| 49 |
<span>Missions</span>
|
| 50 |
</a>
|
nouveau-vehicule.html
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Remorquage Pro - Nouveau Véhicule</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
|
| 10 |
+
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 12 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 13 |
+
<style>
|
| 14 |
+
.sidebar {
|
| 15 |
+
transition: all 0.3s ease;
|
| 16 |
+
}
|
| 17 |
+
.active-menu {
|
| 18 |
+
background-color: #3B82F6;
|
| 19 |
+
color: white;
|
| 20 |
+
}
|
| 21 |
+
</style>
|
| 22 |
+
</head>
|
| 23 |
+
<body class="bg-gray-100 flex h-screen">
|
| 24 |
+
<!-- Sidebar -->
|
| 25 |
+
<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">
|
| 26 |
+
<div class="text-white flex items-center space-x-2 px-4">
|
| 27 |
+
<i data-feather="truck" class="h-8 w-8"></i>
|
| 28 |
+
<span class="text-2xl font-extrabold">Remorquage Pro</span>
|
| 29 |
+
</div>
|
| 30 |
+
<nav>
|
| 31 |
+
<a href="index.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 32 |
+
<i data-feather="home"></i>
|
| 33 |
+
<span>Dashboard</span>
|
| 34 |
+
</a>
|
| 35 |
+
<a href="clients.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 36 |
+
<i data-feather="users"></i>
|
| 37 |
+
<span>Clients</span>
|
| 38 |
+
</a>
|
| 39 |
+
<a href="employes.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 40 |
+
<i data-feather="user-check"></i>
|
| 41 |
+
<span>Employés</span>
|
| 42 |
+
</a>
|
| 43 |
+
<a href="vehicules.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 44 |
+
<i data-feather="truck"></i>
|
| 45 |
+
<span>Véhicules</span>
|
| 46 |
+
</a>
|
| 47 |
+
<a href="missions.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 48 |
+
<i data-feather="map-pin"></i>
|
| 49 |
+
<span>Missions</span>
|
| 50 |
+
</a>
|
| 51 |
+
<a href="assurances.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 52 |
+
<i data-feather="shield"></i>
|
| 53 |
+
<span>Assurances</span>
|
| 54 |
+
</a>
|
| 55 |
+
<a href="reglements.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 56 |
+
<i data-feather="credit-card"></i>
|
| 57 |
+
<span>Règlements</span>
|
| 58 |
+
</a>
|
| 59 |
+
<a href="rapports.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 60 |
+
<i data-feather="bar-chart-2"></i>
|
| 61 |
+
<span>Rapports</span>
|
| 62 |
+
</a>
|
| 63 |
+
</nav>
|
| 64 |
+
</div>
|
| 65 |
+
|
| 66 |
+
<!-- Main Content -->
|
| 67 |
+
<div class="flex-1 flex flex-col overflow-hidden">
|
| 68 |
+
<!-- Header -->
|
| 69 |
+
<header class="bg-white shadow-sm">
|
| 70 |
+
<div class="flex items-center justify-between p-4">
|
| 71 |
+
<div class="flex items-center">
|
| 72 |
+
<button id="menu-toggle" class="text-gray-500 focus:outline-none md:hidden">
|
| 73 |
+
<i data-feather="menu"></i>
|
| 74 |
+
</button>
|
| 75 |
+
<h1 class="text-2xl font-semibold text-gray-800 ml-4">Nouveau Véhicule</h1>
|
| 76 |
+
</div>
|
| 77 |
+
<div class="flex items-center space-x-4">
|
| 78 |
+
<div class="relative">
|
| 79 |
+
<i data-feather="bell" class="text-gray-500"></i>
|
| 80 |
+
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
|
| 81 |
+
</div>
|
| 82 |
+
<div class="flex items-center">
|
| 83 |
+
<img src="http://static.photos/people/40x40/10" alt="Profile" class="h-10 w-10 rounded-full">
|
| 84 |
+
<span class="ml-2 text-gray-700">Admin</span>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
| 87 |
+
</div>
|
| 88 |
+
</header>
|
| 89 |
+
|
| 90 |
+
<!-- Content -->
|
| 91 |
+
<main class="flex-1 overflow-y-auto p-6 bg-gray-100">
|
| 92 |
+
<div class="max-w-3xl mx-auto bg-white rounded-lg shadow p-8" data-aos="fade-up">
|
| 93 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">Informations du véhicule</h2>
|
| 94 |
+
<form class="space-y-6">
|
| 95 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 96 |
+
<div>
|
| 97 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Immatriculation</label>
|
| 98 |
+
<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" required>
|
| 99 |
+
</div>
|
| 100 |
+
<div>
|
| 101 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Marque</label>
|
| 102 |
+
<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" required>
|
| 103 |
+
</div>
|
| 104 |
+
<div>
|
| 105 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Modèle</label>
|
| 106 |
+
<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" required>
|
| 107 |
+
</div>
|
| 108 |
+
<div>
|
| 109 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Type de véhicule</label>
|
| 110 |
+
<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">
|
| 111 |
+
<option value="voiture">Voiture</option>
|
| 112 |
+
<option value="moto">Moto</option>
|
| 113 |
+
<option value="camion">Camion</option>
|
| 114 |
+
<option value="utilitaire">Véhicule utilitaire</option>
|
| 115 |
+
<option value="remorque">Remorque</option>
|
| 116 |
+
</select>
|
| 117 |
+
</div>
|
| 118 |
+
<div>
|
| 119 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Année</label>
|
| 120 |
+
<input type="number" min="1900" max="2099" 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">
|
| 121 |
+
</div>
|
| 122 |
+
<div>
|
| 123 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Couleur</label>
|
| 124 |
+
<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">
|
| 125 |
+
</div>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<div class="border-t border-gray-200 pt-6">
|
| 129 |
+
<h3 class="text-lg font-medium text-gray-800 mb-4">Propriétaire</h3>
|
| 130 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 131 |
+
<div>
|
| 132 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Client associé</label>
|
| 133 |
+
<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">
|
| 134 |
+
<option value="">Sélectionner un client</option>
|
| 135 |
+
<option value="1">Martin Dupont</option>
|
| 136 |
+
<option value="2">Assurance AXA</option>
|
| 137 |
+
<option value="3">Sophie Lambert</option>
|
| 138 |
+
<option value="4">Garage AutoPlus</option>
|
| 139 |
+
</select>
|
| 140 |
+
</div>
|
| 141 |
+
<div>
|
| 142 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Type de propriétaire</label>
|
| 143 |
+
<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">
|
| 144 |
+
<option value="particulier">Particulier</option>
|
| 145 |
+
<option value="professionnel">Professionnel</option>
|
| 146 |
+
<option value="assurance">Assurance</option>
|
| 147 |
+
<option value="garage">Garage</option>
|
| 148 |
+
</select>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<div class="border-t border-gray-200 pt-6">
|
| 154 |
+
<h3 class="text-lg font-medium text-gray-800 mb-4">Documentation technique</h3>
|
| 155 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 156 |
+
<div>
|
| 157 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Date du dernier contrôle technique</label>
|
| 158 |
+
<input type="date" 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">
|
| 159 |
+
</div>
|
| 160 |
+
<div>
|
| 161 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Prochain contrôle technique</label>
|
| 162 |
+
<input type="date" 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">
|
| 163 |
+
</div>
|
| 164 |
+
<div>
|
| 165 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Numéro de carte grise</label>
|
| 166 |
+
<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">
|
| 167 |
+
</div>
|
| 168 |
+
<div>
|
| 169 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Puissance fiscale (CV)</label>
|
| 170 |
+
<input type="number" min="0" 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">
|
| 171 |
+
</div>
|
| 172 |
+
</div>
|
| 173 |
+
</div>
|
| 174 |
+
|
| 175 |
+
<div class="border-t border-gray-200 pt-6">
|
| 176 |
+
<h3 class="text-lg font-medium text-gray-800 mb-4">Photos du véhicule</h3>
|
| 177 |
+
<div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-lg">
|
| 178 |
+
<div class="space-y-1 text-center">
|
| 179 |
+
<svg class="mx-auto h-12 w-12 text-gray-400" stroke="currentColor" fill="none" viewBox="0 0 48 48" aria-hidden="true">
|
| 180 |
+
<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" />
|
| 181 |
+
</svg>
|
| 182 |
+
<div class="flex text-sm text-gray-600">
|
| 183 |
+
<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">
|
| 184 |
+
<span>Uploader des photos</span>
|
| 185 |
+
<input id="file-upload" name="file-upload" type="file" class="sr-only" multiple accept="image/*">
|
| 186 |
+
</label>
|
| 187 |
+
<p class="pl-1">ou glisser-déposer</p>
|
| 188 |
+
</div>
|
| 189 |
+
<p class="text-xs text-gray-500">
|
| 190 |
+
PNG, JPG jusqu'à 10MB
|
| 191 |
+
</p>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
<div id="file-list" class="mt-2 grid grid-cols-3 gap-4"></div>
|
| 195 |
+
</div>
|
| 196 |
+
|
| 197 |
+
<div>
|
| 198 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Remarques</label>
|
| 199 |
+
<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"></textarea>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
<div class="flex justify-end space-x-4 pt-4">
|
| 203 |
+
<a href="vehicules.html" class="px-6 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition duration-200">
|
| 204 |
+
Annuler
|
| 205 |
+
</a>
|
| 206 |
+
<button type="submit" class="px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition duration-200">
|
| 207 |
+
Enregistrer le véhicule
|
| 208 |
+
</button>
|
| 209 |
+
</div>
|
| 210 |
+
</form>
|
| 211 |
+
</div>
|
| 212 |
+
</main>
|
| 213 |
+
</div>
|
| 214 |
+
|
| 215 |
+
<script>
|
| 216 |
+
// Toggle sidebar on mobile
|
| 217 |
+
document.getElementById('menu-toggle').addEventListener('click', function() {
|
| 218 |
+
document.getElementById('sidebar').classList.toggle('-translate-x-full');
|
| 219 |
+
});
|
| 220 |
+
|
| 221 |
+
// Gestion des photos du véhicule
|
| 222 |
+
const fileInput = document.getElementById('file-upload');
|
| 223 |
+
const fileList = document.getElementById('file-list');
|
| 224 |
+
|
| 225 |
+
fileInput.addEventListener('change', function(e) {
|
| 226 |
+
fileList.innerHTML = '';
|
| 227 |
+
|
| 228 |
+
for (const file of e.target.files) {
|
| 229 |
+
const fileItem = document.createElement('div');
|
| 230 |
+
fileItem.className = 'flex items-center p-2 border rounded-lg';
|
| 231 |
+
|
| 232 |
+
const fileIcon = document.createElement('div');
|
| 233 |
+
fileIcon.className = 'flex-shrink-0 mr-3';
|
| 234 |
+
|
| 235 |
+
const imgPreview = document.createElement('img');
|
| 236 |
+
imgPreview.className = 'h-12 w-12 object-cover rounded';
|
| 237 |
+
|
| 238 |
+
if (file.type.includes('image')) {
|
| 239 |
+
const reader = new FileReader();
|
| 240 |
+
reader.onload = function(e) {
|
| 241 |
+
imgPreview.src = e.target.result;
|
| 242 |
+
};
|
| 243 |
+
reader.readAsDataURL(file);
|
| 244 |
+
fileIcon.appendChild(imgPreview);
|
| 245 |
+
} else {
|
| 246 |
+
fileIcon.innerHTML = '<i data-feather="file" class="h-5 w-5 text-gray-400"></i>';
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
const fileInfo = document.createElement('div');
|
| 250 |
+
fileInfo.className = 'flex-1 min-w-0';
|
| 251 |
+
fileInfo.innerHTML = `
|
| 252 |
+
<p class="text-sm font-medium text-gray-900 truncate">${file.name}</p>
|
| 253 |
+
<p class="text-xs text-gray-500">${(file.size / 1024 / 1024).toFixed(2)} MB</p>
|
| 254 |
+
`;
|
| 255 |
+
|
| 256 |
+
const removeBtn = document.createElement('button');
|
| 257 |
+
removeBtn.className = 'ml-2 text-red-500 hover:text-red-700';
|
| 258 |
+
removeBtn.innerHTML = '<i data-feather="x" class="h-4 w-4"></i>';
|
| 259 |
+
removeBtn.onclick = () => fileItem.remove();
|
| 260 |
+
|
| 261 |
+
fileItem.appendChild(fileIcon);
|
| 262 |
+
fileItem.appendChild(fileInfo);
|
| 263 |
+
fileItem.appendChild(removeBtn);
|
| 264 |
+
fileList.appendChild(fileItem);
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
feather.replace();
|
| 268 |
+
});
|
| 269 |
+
|
| 270 |
+
// Gestion du drag and drop
|
| 271 |
+
const dropZone = fileInput.closest('div');
|
| 272 |
+
|
| 273 |
+
dropZone.addEventListener('dragover', (e) => {
|
| 274 |
+
e.preventDefault();
|
| 275 |
+
dropZone.classList.add('border-blue-500');
|
| 276 |
+
});
|
| 277 |
+
|
| 278 |
+
dropZone.addEventListener('dragleave', () => {
|
| 279 |
+
dropZone.classList.remove('border-blue-500');
|
| 280 |
+
});
|
| 281 |
+
|
| 282 |
+
dropZone.addEventListener('drop', (e) => {
|
| 283 |
+
e.preventDefault();
|
| 284 |
+
dropZone.classList.remove('border-blue-500');
|
| 285 |
+
fileInput.files = e.dataTransfer.files;
|
| 286 |
+
fileInput.dispatchEvent(new Event('change'));
|
| 287 |
+
});
|
| 288 |
+
|
| 289 |
+
// Form submission
|
| 290 |
+
document.querySelector('form').addEventListener('submit', function(e) {
|
| 291 |
+
e.preventDefault();
|
| 292 |
+
// Ici vous ajouteriez la logique pour sauvegarder le véhicule
|
| 293 |
+
alert('Véhicule enregistré avec succès!');
|
| 294 |
+
window.location.href = 'vehicules.html';
|
| 295 |
+
});
|
| 296 |
+
</script>
|
| 297 |
+
<script>AOS.init();</script>
|
| 298 |
+
<script>feather.replace();</script>
|
| 299 |
+
</body>
|
| 300 |
+
</html>
|
rapports.html
CHANGED
|
@@ -45,7 +45,7 @@
|
|
| 45 |
<i data-feather="truck"></i>
|
| 46 |
<span>Véhicules</span>
|
| 47 |
</a>
|
| 48 |
-
|
| 49 |
<i data-feather="map-pin"></i>
|
| 50 |
<span>Missions</span>
|
| 51 |
</a>
|
|
|
|
| 45 |
<i data-feather="truck"></i>
|
| 46 |
<span>Véhicules</span>
|
| 47 |
</a>
|
| 48 |
+
<a href="missions.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 49 |
<i data-feather="map-pin"></i>
|
| 50 |
<span>Missions</span>
|
| 51 |
</a>
|
reglements.html
CHANGED
|
@@ -44,7 +44,7 @@
|
|
| 44 |
<i data-feather="truck"></i>
|
| 45 |
<span>Véhicules</span>
|
| 46 |
</a>
|
| 47 |
-
|
| 48 |
<i data-feather="map-pin"></i>
|
| 49 |
<span>Missions</span>
|
| 50 |
</a>
|
|
|
|
| 44 |
<i data-feather="truck"></i>
|
| 45 |
<span>Véhicules</span>
|
| 46 |
</a>
|
| 47 |
+
<a href="missions.html" class="py-2.5 px-4 rounded transition duration-200 flex items-center space-x-2 hover:bg-blue-700">
|
| 48 |
<i data-feather="map-pin"></i>
|
| 49 |
<span>Missions</span>
|
| 50 |
</a>
|