Add 2 files
Browse files- README.md +6 -4
- index.html +566 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: blue
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: gestock
|
| 3 |
+
emoji: 🐳
|
| 4 |
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,566 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ENTERIE</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
| 10 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 11 |
+
<style>
|
| 12 |
+
.sidebar {
|
| 13 |
+
transition: all 0.3s;
|
| 14 |
+
}
|
| 15 |
+
.sidebar.collapsed {
|
| 16 |
+
width: 70px;
|
| 17 |
+
}
|
| 18 |
+
.sidebar.collapsed .sidebar-text {
|
| 19 |
+
display: none;
|
| 20 |
+
}
|
| 21 |
+
.sidebar.collapsed .sidebar-icon {
|
| 22 |
+
margin-right: 0;
|
| 23 |
+
}
|
| 24 |
+
.main-content {
|
| 25 |
+
transition: all 0.3s;
|
| 26 |
+
}
|
| 27 |
+
.sidebar.collapsed + .main-content {
|
| 28 |
+
margin-left: 70px;
|
| 29 |
+
}
|
| 30 |
+
.stock-low {
|
| 31 |
+
background-color: rgba(239, 68, 68, 0.1);
|
| 32 |
+
border-left: 4px solid #ef4444;
|
| 33 |
+
}
|
| 34 |
+
.stock-critical {
|
| 35 |
+
background-color: rgba(239, 68, 68, 0.2);
|
| 36 |
+
border-left: 4px solid #ef4444;
|
| 37 |
+
animation: pulse 2s infinite;
|
| 38 |
+
}
|
| 39 |
+
@keyframes pulse {
|
| 40 |
+
0% { opacity: 1; }
|
| 41 |
+
50% { opacity: 0.5; }
|
| 42 |
+
100% { opacity: 1; }
|
| 43 |
+
}
|
| 44 |
+
.stock-ok {
|
| 45 |
+
border-left: 4px solid #10b981;
|
| 46 |
+
}
|
| 47 |
+
</style>
|
| 48 |
+
</head>
|
| 49 |
+
<body class="bg-gray-100 font-sans">
|
| 50 |
+
<div class="flex h-screen overflow-hidden">
|
| 51 |
+
<!-- Sidebar -->
|
| 52 |
+
<div class="sidebar bg-blue-800 text-white w-64 flex flex-col">
|
| 53 |
+
<div class="p-4 flex items-center justify-between border-b border-blue-700">
|
| 54 |
+
<div class="flex items-center">
|
| 55 |
+
<i class="fas fa-industry text-2xl sidebar-icon mr-3"></i>
|
| 56 |
+
<span class="sidebar-text font-bold text-xl">CIMENTERIE</span>
|
| 57 |
+
</div>
|
| 58 |
+
<button id="toggleSidebar" class="text-white focus:outline-none">
|
| 59 |
+
<i class="fas fa-bars"></i>
|
| 60 |
+
</button>
|
| 61 |
+
</div>
|
| 62 |
+
<div class="flex-1 overflow-y-auto">
|
| 63 |
+
<nav class="p-4">
|
| 64 |
+
<div class="mb-6">
|
| 65 |
+
<p class="sidebar-text uppercase text-xs font-semibold text-blue-300 mb-2">Menu Principal</p>
|
| 66 |
+
<ul>
|
| 67 |
+
<li class="mb-2">
|
| 68 |
+
<a href="#" class="flex items-center p-2 rounded hover:bg-blue-700 bg-blue-700">
|
| 69 |
+
<i class="fas fa-tachometer-alt sidebar-icon mr-3"></i>
|
| 70 |
+
<span class="sidebar-text">Tableau de bord</span>
|
| 71 |
+
</a>
|
| 72 |
+
</li>
|
| 73 |
+
<li class="mb-2">
|
| 74 |
+
<a href="#" class="flex items-center p-2 rounded hover:bg-blue-700">
|
| 75 |
+
<i class="fas fa-boxes sidebar-icon mr-3"></i>
|
| 76 |
+
<span class="sidebar-text">Gestion des stocks</span>
|
| 77 |
+
</a>
|
| 78 |
+
</li>
|
| 79 |
+
<li class="mb-2">
|
| 80 |
+
<a href="#" class="flex items-center p-2 rounded hover:bg-blue-700">
|
| 81 |
+
<i class="fas fa-exchange-alt sidebar-icon mr-3"></i>
|
| 82 |
+
<span class="sidebar-text">Mouvements</span>
|
| 83 |
+
</a>
|
| 84 |
+
</li>
|
| 85 |
+
<li class="mb-2">
|
| 86 |
+
<a href="#" class="flex items-center p-2 rounded hover:bg-blue-700">
|
| 87 |
+
<i class="fas fa-truck sidebar-icon mr-3"></i>
|
| 88 |
+
<span class="sidebar-text">Fournisseurs</span>
|
| 89 |
+
</a>
|
| 90 |
+
</li>
|
| 91 |
+
</ul>
|
| 92 |
+
</div>
|
| 93 |
+
<div class="mb-6">
|
| 94 |
+
<p class="sidebar-text uppercase text-xs font-semibold text-blue-300 mb-2">Rapports</p>
|
| 95 |
+
<ul>
|
| 96 |
+
<li class="mb-2">
|
| 97 |
+
<a href="#" class="flex items-center p-2 rounded hover:bg-blue-700">
|
| 98 |
+
<i class="fas fa-chart-line sidebar-icon mr-3"></i>
|
| 99 |
+
<span class="sidebar-text">Statistiques</span>
|
| 100 |
+
</a>
|
| 101 |
+
</li>
|
| 102 |
+
<li class="mb-2">
|
| 103 |
+
<a href="#" class="flex items-center p-2 rounded hover:bg-blue-700">
|
| 104 |
+
<i class="fas fa-file-pdf sidebar-icon mr-3"></i>
|
| 105 |
+
<span class="sidebar-text">Exporter PDF</span>
|
| 106 |
+
</a>
|
| 107 |
+
</li>
|
| 108 |
+
</ul>
|
| 109 |
+
</div>
|
| 110 |
+
<div>
|
| 111 |
+
<p class="sidebar-text uppercase text-xs font-semibold text-blue-300 mb-2">Administration</p>
|
| 112 |
+
<ul>
|
| 113 |
+
<li class="mb-2">
|
| 114 |
+
<a href="#" class="flex items-center p-2 rounded hover:bg-blue-700">
|
| 115 |
+
<i class="fas fa-users sidebar-icon mr-3"></i>
|
| 116 |
+
<span class="sidebar-text">Utilisateurs</span>
|
| 117 |
+
</a>
|
| 118 |
+
</li>
|
| 119 |
+
<li class="mb-2">
|
| 120 |
+
<a href="#" class="flex items-center p-2 rounded hover:bg-blue-700">
|
| 121 |
+
<i class="fas fa-cog sidebar-icon mr-3"></i>
|
| 122 |
+
<span class="sidebar-text">Paramètres</span>
|
| 123 |
+
</a>
|
| 124 |
+
</li>
|
| 125 |
+
</ul>
|
| 126 |
+
</div>
|
| 127 |
+
</nav>
|
| 128 |
+
</div>
|
| 129 |
+
<div class="p-4 border-t border-blue-700">
|
| 130 |
+
<div class="flex items-center">
|
| 131 |
+
<img src="https://ui-avatars.com/api/?name=Admin+User&background=random" class="w-8 h-8 rounded-full mr-3" alt="User">
|
| 132 |
+
<div class="sidebar-text">
|
| 133 |
+
<p class="text-sm font-semibold">Admin User</p>
|
| 134 |
+
<p class="text-xs text-blue-300">Administrateur</p>
|
| 135 |
+
</div>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
|
| 140 |
+
<!-- Main Content -->
|
| 141 |
+
<div class="main-content flex-1 overflow-auto ml-64">
|
| 142 |
+
<header class="bg-white shadow-sm p-4 flex justify-between items-center">
|
| 143 |
+
<h1 class="text-2xl font-bold text-gray-800">Tableau de bord</h1>
|
| 144 |
+
<div class="flex items-center space-x-4">
|
| 145 |
+
<div class="relative">
|
| 146 |
+
<i class="fas fa-bell text-gray-500 text-xl"></i>
|
| 147 |
+
<span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
|
| 148 |
+
</div>
|
| 149 |
+
<div class="relative">
|
| 150 |
+
<input type="text" placeholder="Rechercher..." class="pl-8 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 151 |
+
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
|
| 152 |
+
</div>
|
| 153 |
+
</div>
|
| 154 |
+
</header>
|
| 155 |
+
|
| 156 |
+
<main class="p-6">
|
| 157 |
+
<!-- Stats Cards -->
|
| 158 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
|
| 159 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 160 |
+
<div class="flex items-center">
|
| 161 |
+
<div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4">
|
| 162 |
+
<i class="fas fa-box-open text-xl"></i>
|
| 163 |
+
</div>
|
| 164 |
+
<div>
|
| 165 |
+
<p class="text-gray-500">Produits en stock</p>
|
| 166 |
+
<h3 class="text-2xl font-bold">1,248</h3>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 171 |
+
<div class="flex items-center">
|
| 172 |
+
<div class="p-3 rounded-full bg-green-100 text-green-600 mr-4">
|
| 173 |
+
<i class="fas fa-arrow-down text-xl"></i>
|
| 174 |
+
</div>
|
| 175 |
+
<div>
|
| 176 |
+
<p class="text-gray-500">Entrées ce mois</p>
|
| 177 |
+
<h3 class="text-2xl font-bold">342</h3>
|
| 178 |
+
</div>
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 182 |
+
<div class="flex items-center">
|
| 183 |
+
<div class="p-3 rounded-full bg-red-100 text-red-600 mr-4">
|
| 184 |
+
<i class="fas fa-arrow-up text-xl"></i>
|
| 185 |
+
</div>
|
| 186 |
+
<div>
|
| 187 |
+
<p class="text-gray-500">Sorties ce mois</p>
|
| 188 |
+
<h3 class="text-2xl font-bold">287</h3>
|
| 189 |
+
</div>
|
| 190 |
+
</div>
|
| 191 |
+
</div>
|
| 192 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 193 |
+
<div class="flex items-center">
|
| 194 |
+
<div class="p-3 rounded-full bg-yellow-100 text-yellow-600 mr-4">
|
| 195 |
+
<i class="fas fa-exclamation-triangle text-xl"></i>
|
| 196 |
+
</div>
|
| 197 |
+
<div>
|
| 198 |
+
<p class="text-gray-500">Alertes stock</p>
|
| 199 |
+
<h3 class="text-2xl font-bold">12</h3>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
</div>
|
| 203 |
+
</div>
|
| 204 |
+
|
| 205 |
+
<!-- Charts and Forms -->
|
| 206 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
|
| 207 |
+
<!-- Stock Chart -->
|
| 208 |
+
<div class="bg-white rounded-lg shadow p-6 lg:col-span-2">
|
| 209 |
+
<div class="flex justify-between items-center mb-4">
|
| 210 |
+
<h2 class="text-lg font-semibold">Niveaux de stock par catégorie</h2>
|
| 211 |
+
<select class="border rounded px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 212 |
+
<option>7 derniers jours</option>
|
| 213 |
+
<option>30 derniers jours</option>
|
| 214 |
+
<option selected>Cette année</option>
|
| 215 |
+
</select>
|
| 216 |
+
</div>
|
| 217 |
+
<div class="h-64">
|
| 218 |
+
<canvas id="stockChart"></canvas>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
|
| 222 |
+
<!-- Movement Form -->
|
| 223 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 224 |
+
<h2 class="text-lg font-semibold mb-4">Nouveau mouvement</h2>
|
| 225 |
+
<form id="movementForm" class="space-y-4">
|
| 226 |
+
<div>
|
| 227 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Type de mouvement</label>
|
| 228 |
+
<select name="type" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 229 |
+
<option value="">Sélectionner...</option>
|
| 230 |
+
<option value="entree">Entrée de stock</option>
|
| 231 |
+
<option value="sortie">Sortie de stock</option>
|
| 232 |
+
<option value="inventaire">Inventaire</option>
|
| 233 |
+
</select>
|
| 234 |
+
</div>
|
| 235 |
+
<div>
|
| 236 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Produit</label>
|
| 237 |
+
<select name="produit_id" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 238 |
+
<option value="">Sélectionner un produit...</option>
|
| 239 |
+
<option value="1">Ciment 32.5 (CIM-001)</option>
|
| 240 |
+
<option value="2">Ciment 42.5 (CIM-002)</option>
|
| 241 |
+
<option value="3">Adjuvant SuperPlast (CIM-003)</option>
|
| 242 |
+
<option value="4">Bétonnière 500L (CIM-004)</option>
|
| 243 |
+
</select>
|
| 244 |
+
</div>
|
| 245 |
+
<div>
|
| 246 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Quantité</label>
|
| 247 |
+
<input type="number" name="quantite" min="1" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 248 |
+
</div>
|
| 249 |
+
<div>
|
| 250 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Commentaire</label>
|
| 251 |
+
<textarea name="commentaire" rows="2" class="w-full border rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
|
| 252 |
+
</div>
|
| 253 |
+
<button type="submit" class="w-full bg-blue-600 text-white py-2 px-4 rounded hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
|
| 254 |
+
Enregistrer le mouvement
|
| 255 |
+
</button>
|
| 256 |
+
</form>
|
| 257 |
+
</div>
|
| 258 |
+
</div>
|
| 259 |
+
|
| 260 |
+
<!-- Stock Alerts and Recent Movements -->
|
| 261 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
| 262 |
+
<!-- Stock Alerts -->
|
| 263 |
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
| 264 |
+
<div class="bg-red-600 text-white px-6 py-3">
|
| 265 |
+
<h2 class="font-semibold">Alertes de stock critique</h2>
|
| 266 |
+
</div>
|
| 267 |
+
<div class="divide-y">
|
| 268 |
+
<div class="p-4 stock-critical">
|
| 269 |
+
<div class="flex items-center justify-between">
|
| 270 |
+
<div>
|
| 271 |
+
<p class="font-medium">Ciment 32.5 (CIM-001)</p>
|
| 272 |
+
<p class="text-sm text-gray-600">Stock: 12 tonnes (seuil: 50)</p>
|
| 273 |
+
</div>
|
| 274 |
+
<button class="text-red-600 hover:text-red-800">
|
| 275 |
+
<i class="fas fa-ellipsis-v"></i>
|
| 276 |
+
</button>
|
| 277 |
+
</div>
|
| 278 |
+
</div>
|
| 279 |
+
<div class="p-4 stock-low">
|
| 280 |
+
<div class="flex items-center justify-between">
|
| 281 |
+
<div>
|
| 282 |
+
<p class="font-medium">Adjuvant SuperPlast (CIM-003)</p>
|
| 283 |
+
<p class="text-sm text-gray-600">Stock: 32 litres (seuil: 40)</p>
|
| 284 |
+
</div>
|
| 285 |
+
<button class="text-red-600 hover:text-red-800">
|
| 286 |
+
<i class="fas fa-ellipsis-v"></i>
|
| 287 |
+
</button>
|
| 288 |
+
</div>
|
| 289 |
+
</div>
|
| 290 |
+
<div class="p-4 stock-low">
|
| 291 |
+
<div class="flex items-center justify-between">
|
| 292 |
+
<div>
|
| 293 |
+
<p class="font-medium">Bétonnière 500L (CIM-004)</p>
|
| 294 |
+
<p class="text-sm text-gray-600">Stock: 3 unités (seuil: 5)</p>
|
| 295 |
+
</div>
|
| 296 |
+
<button class="text-red-600 hover:text-red-800">
|
| 297 |
+
<i class="fas fa-ellipsis-v"></i>
|
| 298 |
+
</button>
|
| 299 |
+
</div>
|
| 300 |
+
</div>
|
| 301 |
+
</div>
|
| 302 |
+
</div>
|
| 303 |
+
|
| 304 |
+
<!-- Recent Movements -->
|
| 305 |
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
| 306 |
+
<div class="bg-blue-600 text-white px-6 py-3">
|
| 307 |
+
<h2 class="font-semibold">Derniers mouvements</h2>
|
| 308 |
+
</div>
|
| 309 |
+
<div class="divide-y">
|
| 310 |
+
<div class="p-4">
|
| 311 |
+
<div class="flex items-center justify-between">
|
| 312 |
+
<div>
|
| 313 |
+
<p class="font-medium">Entrée - Ciment 42.5</p>
|
| 314 |
+
<p class="text-sm text-gray-600">+50 tonnes - Aujourd'hui 09:23</p>
|
| 315 |
+
</div>
|
| 316 |
+
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded">Entrée</span>
|
| 317 |
+
</div>
|
| 318 |
+
</div>
|
| 319 |
+
<div class="p-4">
|
| 320 |
+
<div class="flex items-center justify-between">
|
| 321 |
+
<div>
|
| 322 |
+
<p class="font-medium">Sortie - Adjuvant SuperPlast</p>
|
| 323 |
+
<p class="text-sm text-gray-600">-15 litres - Hier 16:45</p>
|
| 324 |
+
</div>
|
| 325 |
+
<span class="bg-red-100 text-red-800 text-xs px-2 py-1 rounded">Sortie</span>
|
| 326 |
+
</div>
|
| 327 |
+
</div>
|
| 328 |
+
<div class="p-4">
|
| 329 |
+
<div class="flex items-center justify-between">
|
| 330 |
+
<div>
|
| 331 |
+
<p class="font-medium">Inventaire - Bétonnière 500L</p>
|
| 332 |
+
<p class="text-sm text-gray-600">Ajustement: +1 unité - Hier 10:12</p>
|
| 333 |
+
</div>
|
| 334 |
+
<span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded">Inventaire</span>
|
| 335 |
+
</div>
|
| 336 |
+
</div>
|
| 337 |
+
</div>
|
| 338 |
+
</div>
|
| 339 |
+
</div>
|
| 340 |
+
|
| 341 |
+
<!-- Products Table -->
|
| 342 |
+
<div class="bg-white rounded-lg shadow mt-6 overflow-hidden">
|
| 343 |
+
<div class="px-6 py-4 border-b flex justify-between items-center">
|
| 344 |
+
<h2 class="font-semibold">Liste des produits</h2>
|
| 345 |
+
<div class="flex space-x-2">
|
| 346 |
+
<button class="bg-blue-600 text-white px-3 py-1 rounded text-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 347 |
+
<i class="fas fa-plus mr-1"></i> Ajouter
|
| 348 |
+
</button>
|
| 349 |
+
<button class="bg-gray-200 text-gray-700 px-3 py-1 rounded text-sm hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500">
|
| 350 |
+
<i class="fas fa-download mr-1"></i> Exporter
|
| 351 |
+
</button>
|
| 352 |
+
</div>
|
| 353 |
+
</div>
|
| 354 |
+
<div class="overflow-x-auto">
|
| 355 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 356 |
+
<thead class="bg-gray-50">
|
| 357 |
+
<tr>
|
| 358 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Référence</th>
|
| 359 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nom</th>
|
| 360 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Catégorie</th>
|
| 361 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Stock</th>
|
| 362 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Seuil</th>
|
| 363 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Prix</th>
|
| 364 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
|
| 365 |
+
</tr>
|
| 366 |
+
</thead>
|
| 367 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
| 368 |
+
<tr>
|
| 369 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CIM-001</td>
|
| 370 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Ciment 32.5</td>
|
| 371 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 372 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Ciment</span>
|
| 373 |
+
</td>
|
| 374 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12 tonnes</td>
|
| 375 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">50 tonnes</td>
|
| 376 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">850 DH</td>
|
| 377 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 378 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3">
|
| 379 |
+
<i class="fas fa-edit"></i>
|
| 380 |
+
</button>
|
| 381 |
+
<button class="text-red-600 hover:text-red-900">
|
| 382 |
+
<i class="fas fa-trash"></i>
|
| 383 |
+
</button>
|
| 384 |
+
</td>
|
| 385 |
+
</tr>
|
| 386 |
+
<tr>
|
| 387 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CIM-002</td>
|
| 388 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Ciment 42.5</td>
|
| 389 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 390 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Ciment</span>
|
| 391 |
+
</td>
|
| 392 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">78 tonnes</td>
|
| 393 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">50 tonnes</td>
|
| 394 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">950 DH</td>
|
| 395 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 396 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3">
|
| 397 |
+
<i class="fas fa-edit"></i>
|
| 398 |
+
</button>
|
| 399 |
+
<button class="text-red-600 hover:text-red-900">
|
| 400 |
+
<i class="fas fa-trash"></i>
|
| 401 |
+
</button>
|
| 402 |
+
</td>
|
| 403 |
+
</tr>
|
| 404 |
+
<tr>
|
| 405 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CIM-003</td>
|
| 406 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Adjuvant SuperPlast</td>
|
| 407 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 408 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Adjuvant</span>
|
| 409 |
+
</td>
|
| 410 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">32 litres</td>
|
| 411 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">40 litres</td>
|
| 412 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">120 DH</td>
|
| 413 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 414 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3">
|
| 415 |
+
<i class="fas fa-edit"></i>
|
| 416 |
+
</button>
|
| 417 |
+
<button class="text-red-600 hover:text-red-900">
|
| 418 |
+
<i class="fas fa-trash"></i>
|
| 419 |
+
</button>
|
| 420 |
+
</td>
|
| 421 |
+
</tr>
|
| 422 |
+
<tr>
|
| 423 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CIM-004</td>
|
| 424 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Bétonnière 500L</td>
|
| 425 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 426 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Matériel</span>
|
| 427 |
+
</td>
|
| 428 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3 unités</td>
|
| 429 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5 unités</td>
|
| 430 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12,500 DH</td>
|
| 431 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 432 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3">
|
| 433 |
+
<i class="fas fa-edit"></i>
|
| 434 |
+
</button>
|
| 435 |
+
<button class="text-red-600 hover:text-red-900">
|
| 436 |
+
<i class="fas fa-trash"></i>
|
| 437 |
+
</button>
|
| 438 |
+
</td>
|
| 439 |
+
</tr>
|
| 440 |
+
</tbody>
|
| 441 |
+
</table>
|
| 442 |
+
</div>
|
| 443 |
+
<div class="px-6 py-4 border-t flex items-center justify-between">
|
| 444 |
+
<div class="text-sm text-gray-500">
|
| 445 |
+
Affichage <span class="font-medium">1</span> à <span class="font-medium">4</span> sur <span class="font-medium">12</span> produits
|
| 446 |
+
</div>
|
| 447 |
+
<div class="flex space-x-2">
|
| 448 |
+
<button class="px-3 py-1 border rounded text-sm text-gray-700 hover:bg-gray-50">
|
| 449 |
+
Précédent
|
| 450 |
+
</button>
|
| 451 |
+
<button class="px-3 py-1 border rounded text-sm text-gray-700 hover:bg-gray-50">
|
| 452 |
+
Suivant
|
| 453 |
+
</button>
|
| 454 |
+
</div>
|
| 455 |
+
</div>
|
| 456 |
+
</div>
|
| 457 |
+
</main>
|
| 458 |
+
</div>
|
| 459 |
+
</div>
|
| 460 |
+
|
| 461 |
+
<script>
|
| 462 |
+
// Toggle sidebar
|
| 463 |
+
document.getElementById('toggleSidebar').addEventListener('click', function() {
|
| 464 |
+
document.querySelector('.sidebar').classList.toggle('collapsed');
|
| 465 |
+
});
|
| 466 |
+
|
| 467 |
+
// Initialize charts
|
| 468 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 469 |
+
// Stock Chart
|
| 470 |
+
const stockCtx = document.getElementById('stockChart').getContext('2d');
|
| 471 |
+
const stockChart = new Chart(stockCtx, {
|
| 472 |
+
type: 'bar',
|
| 473 |
+
data: {
|
| 474 |
+
labels: ['Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Août', 'Sep', 'Oct', 'Nov', 'Déc'],
|
| 475 |
+
datasets: [
|
| 476 |
+
{
|
| 477 |
+
label: 'Ciment 32.5',
|
| 478 |
+
data: [1200, 1100, 950, 800, 750, 700, 650, 600, 550, 500, 450, 400],
|
| 479 |
+
backgroundColor: '#3b82f6',
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
label: 'Ciment 42.5',
|
| 483 |
+
data: [900, 850, 800, 750, 700, 650, 600, 550, 500, 450, 400, 350],
|
| 484 |
+
backgroundColor: '#10b981',
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
label: 'Adjuvants',
|
| 488 |
+
data: [300, 280, 260, 240, 220, 200, 180, 160, 140, 120, 100, 80],
|
| 489 |
+
backgroundColor: '#f59e0b',
|
| 490 |
+
}
|
| 491 |
+
]
|
| 492 |
+
},
|
| 493 |
+
options: {
|
| 494 |
+
responsive: true,
|
| 495 |
+
maintainAspectRatio: false,
|
| 496 |
+
scales: {
|
| 497 |
+
y: {
|
| 498 |
+
beginAtZero: true,
|
| 499 |
+
title: {
|
| 500 |
+
display: true,
|
| 501 |
+
text: 'Quantité (tonnes/litres)'
|
| 502 |
+
}
|
| 503 |
+
},
|
| 504 |
+
x: {
|
| 505 |
+
title: {
|
| 506 |
+
display: true,
|
| 507 |
+
text: 'Mois'
|
| 508 |
+
}
|
| 509 |
+
}
|
| 510 |
+
},
|
| 511 |
+
plugins: {
|
| 512 |
+
legend: {
|
| 513 |
+
position: 'bottom',
|
| 514 |
+
},
|
| 515 |
+
tooltip: {
|
| 516 |
+
callbacks: {
|
| 517 |
+
label: function(context) {
|
| 518 |
+
let label = context.dataset.label || '';
|
| 519 |
+
if (label) {
|
| 520 |
+
label += ': ';
|
| 521 |
+
}
|
| 522 |
+
if (context.parsed.y !== null) {
|
| 523 |
+
label += context.parsed.y + ' ' +
|
| 524 |
+
(context.dataset.label.includes('Ciment') ? 'tonnes' : 'litres');
|
| 525 |
+
}
|
| 526 |
+
return label;
|
| 527 |
+
}
|
| 528 |
+
}
|
| 529 |
+
}
|
| 530 |
+
}
|
| 531 |
+
}
|
| 532 |
+
});
|
| 533 |
+
|
| 534 |
+
// Movement Form Submission
|
| 535 |
+
document.getElementById('movementForm').addEventListener('submit', function(e) {
|
| 536 |
+
e.preventDefault();
|
| 537 |
+
|
| 538 |
+
// Simulate form submission
|
| 539 |
+
Swal.fire({
|
| 540 |
+
title: 'Mouvement enregistré!',
|
| 541 |
+
text: 'Le mouvement de stock a été enregistré avec succès.',
|
| 542 |
+
icon: 'success',
|
| 543 |
+
confirmButtonText: 'OK'
|
| 544 |
+
}).then(() => {
|
| 545 |
+
// Reset form
|
| 546 |
+
e.target.reset();
|
| 547 |
+
});
|
| 548 |
+
});
|
| 549 |
+
});
|
| 550 |
+
|
| 551 |
+
// Simulate real-time updates
|
| 552 |
+
setInterval(() => {
|
| 553 |
+
const alerts = document.querySelectorAll('.stock-low, .stock-critical');
|
| 554 |
+
alerts.forEach(alert => {
|
| 555 |
+
if (alert.classList.contains('stock-critical')) {
|
| 556 |
+
alert.classList.remove('stock-critical');
|
| 557 |
+
alert.classList.add('stock-low');
|
| 558 |
+
} else {
|
| 559 |
+
alert.classList.remove('stock-low');
|
| 560 |
+
alert.classList.add('stock-critical');
|
| 561 |
+
}
|
| 562 |
+
});
|
| 563 |
+
}, 3000);
|
| 564 |
+
</script>
|
| 565 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=elsecond/gestock" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 566 |
+
</html>
|