Spaces:
Running
Running
File size: 36,981 Bytes
143babf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Comptabilité Pro - Gestion des dépenses</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.receipt-scanner {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
.camera-preview {
width: 100%;
height: 300px;
background-color: #e5e7eb;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
}
.scan-animation {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 5px;
background: rgba(59, 130, 246, 0.5);
box-shadow: 0 0 10px rgba(59, 130, 246, 0.7);
animation: scan 3s linear infinite;
}
@keyframes scan {
0% { top: 0; }
100% { top: 100%; }
}
.receipt-item:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.chart-container {
height: 300px;
}
.drawer {
transition: transform 0.3s ease-in-out;
}
.drawer.closed {
transform: translateX(100%);
}
.drawer.open {
transform: translateX(0);
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Header -->
<header class="bg-blue-600 text-white shadow-lg">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-calculator text-2xl"></i>
<h1 class="text-xl font-bold">Comptabilité Pro</h1>
</div>
<div class="flex items-center space-x-4">
<button class="bg-blue-700 hover:bg-blue-800 px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-file-export mr-2"></i> Exporter
</button>
<div class="relative">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-10 h-10 rounded-full cursor-pointer">
<div class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50 hidden">
<a href="#" class="block px-4 py-2 text-gray-800 hover:bg-gray-100">Profil</a>
<a href="#" class="block px-4 py-2 text-gray-800 hover:bg-gray-100">Paramètres</a>
<a href="#" class="block px-4 py-2 text-gray-800 hover:bg-gray-100">Déconnexion</a>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="container mx-auto px-4 py-6 flex">
<!-- Sidebar -->
<aside class="w-64 bg-white rounded-lg shadow-md p-4 mr-6 hidden md:block">
<nav>
<ul class="space-y-2">
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg bg-blue-100 text-blue-600">
<i class="fas fa-home"></i>
<span>Tableau de bord</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100">
<i class="fas fa-receipt"></i>
<span>Dépenses</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100">
<i class="fas fa-euro-sign"></i>
<span>Revenus</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100">
<i class="fas fa-chart-pie"></i>
<span>Rapports</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100">
<i class="fas fa-cog"></i>
<span>Paramètres</span>
</a>
</li>
</ul>
</nav>
<div class="mt-8">
<h3 class="font-semibold text-gray-500 uppercase text-xs mb-2">Catégories</h3>
<ul class="space-y-1">
<li><a href="#" class="flex items-center p-2 text-sm rounded-lg hover:bg-gray-100"><span class="w-3 h-3 bg-red-500 rounded-full mr-2"></span> Fournitures</a></li>
<li><a href="#" class="flex items-center p-2 text-sm rounded-lg hover:bg-gray-100"><span class="w-3 h-3 bg-blue-500 rounded-full mr-2"></span> Déplacements</a></li>
<li><a href="#" class="flex items-center p-2 text-sm rounded-lg hover:bg-gray-100"><span class="w-3 h-3 bg-green-500 rounded-full mr-2"></span> Repas</a></li>
<li><a href="#" class="flex items-center p-2 text-sm rounded-lg hover:bg-gray-100"><span class="w-3 h-3 bg-yellow-500 rounded-full mr-2"></span> Équipement</a></li>
<li><a href="#" class="flex items-center p-2 text-sm rounded-lg hover:bg-gray-100"><span class="w-3 h-3 bg-purple-500 rounded-full mr-2"></span> Autres</a></li>
</ul>
</div>
</aside>
<!-- Mobile menu button -->
<button id="mobile-menu-button" class="md:hidden fixed bottom-6 right-6 bg-blue-600 text-white p-4 rounded-full shadow-lg z-50">
<i class="fas fa-bars text-xl"></i>
</button>
<!-- Mobile drawer -->
<div id="mobile-drawer" class="drawer closed fixed inset-y-0 right-0 w-64 bg-white shadow-lg z-40 p-4">
<div class="flex justify-between items-center mb-6">
<h2 class="text-lg font-semibold">Menu</h2>
<button id="close-drawer" class="text-gray-500">
<i class="fas fa-times"></i>
</button>
</div>
<nav>
<ul class="space-y-2">
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg bg-blue-100 text-blue-600">
<i class="fas fa-home"></i>
<span>Tableau de bord</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100">
<i class="fas fa-receipt"></i>
<span>Dépenses</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100">
<i class="fas fa-euro-sign"></i>
<span>Revenus</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100">
<i class="fas fa-chart-pie"></i>
<span>Rapports</span>
</a>
</li>
<li>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100">
<i class="fas fa-cog"></i>
<span>Paramètres</span>
</a>
</li>
</ul>
</nav>
</div>
<!-- Main Content Area -->
<main class="flex-1">
<!-- Dashboard Header -->
<div class="flex justify-between items-center mb-6">
<div>
<h2 class="text-2xl font-bold text-gray-800">Tableau de bord</h2>
<p class="text-gray-600">Bienvenue dans votre espace de gestion comptable</p>
</div>
<div class="flex space-x-3">
<div class="relative">
<input type="text" placeholder="Rechercher..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-plus mr-2"></i> Ajouter
</button>
</div>
</div>
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex justify-between">
<div>
<p class="text-gray-500">Dépenses ce mois</p>
<p class="text-2xl font-bold">€1,245</p>
</div>
<div class="bg-blue-100 text-blue-600 p-3 rounded-full">
<i class="fas fa-receipt"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i class="fas fa-arrow-up mr-1"></i>
<span>12% vs mois dernier</span>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex justify-between">
<div>
<p class="text-gray-500">Revenus ce mois</p>
<p class="text-2xl font-bold">€3,890</p>
</div>
<div class="bg-green-100 text-green-600 p-3 rounded-full">
<i class="fas fa-euro-sign"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i class="fas fa-arrow-up mr-1"></i>
<span>8% vs mois dernier</span>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex justify-between">
<div>
<p class="text-gray-500">Tickets scannés</p>
<p class="text-2xl font-bold">24</p>
</div>
<div class="bg-purple-100 text-purple-600 p-3 rounded-full">
<i class="fas fa-camera"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-red-500">
<i class="fas fa-arrow-down mr-1"></i>
<span>5% vs mois dernier</span>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex justify-between">
<div>
<p class="text-gray-500">Bénéfice</p>
<p class="text-2xl font-bold">€2,645</p>
</div>
<div class="bg-yellow-100 text-yellow-600 p-3 rounded-full">
<i class="fas fa-chart-line"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i class="fas fa-arrow-up mr-1"></i>
<span>15% vs mois dernier</span>
</div>
</div>
</div>
</div>
<!-- Scanner Section -->
<div class="bg-white rounded-lg shadow-md p-6 mb-6 receipt-scanner">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold">Scanner un ticket de caisse</h3>
<button class="text-blue-600 hover:text-blue-800">
<i class="fas fa-history mr-1"></i> Historique
</button>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div>
<div class="camera-preview mb-4 rounded-lg overflow-hidden">
<div id="camera-view" class="w-full h-full flex items-center justify-center">
<div class="text-center">
<i class="fas fa-camera text-4xl text-gray-400 mb-2"></i>
<p class="text-gray-500">Appuyez sur le bouton pour démarrer la caméra</p>
</div>
</div>
<div id="scan-animation" class="scan-animation hidden"></div>
</div>
<div class="flex space-x-3">
<button id="start-camera" class="flex-1 bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg flex items-center justify-center">
<i class="fas fa-camera mr-2"></i> Démarrer la caméra
</button>
<button id="capture-receipt" class="flex-1 bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-lg flex items-center justify-center hidden">
<i class="fas fa-camera-retro mr-2"></i> Capturer
</button>
</div>
</div>
<div>
<div class="bg-white p-4 rounded-lg shadow-inner mb-4">
<h4 class="font-medium mb-3">Détails du ticket</h4>
<form id="receipt-form">
<div class="mb-3">
<label class="block text-gray-700 text-sm font-medium mb-1">Montant (€)</label>
<input type="number" step="0.01" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="0.00" required>
</div>
<div class="mb-3">
<label class="block text-gray-700 text-sm font-medium mb-1">Date</label>
<input type="date" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div class="mb-3">
<label class="block text-gray-700 text-sm font-medium mb-1">Catégorie</label>
<select class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" required>
<option value="">Sélectionner une catégorie</option>
<option value="supplies">Fournitures</option>
<option value="travel">Déplacements</option>
<option value="meals">Repas</option>
<option value="equipment">Équipement</option>
<option value="other">Autres</option>
</select>
</div>
<div class="mb-3">
<label class="block text-gray-700 text-sm font-medium mb-1">Description</label>
<textarea rows="2" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Notes supplémentaires..."></textarea>
</div>
<button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg">
<i class="fas fa-save mr-2"></i> Enregistrer
</button>
</form>
</div>
</div>
</div>
</div>
<!-- Recent Receipts -->
<div class="bg-white rounded-lg shadow-md p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold">Dépenses récentes</h3>
<button class="text-blue-600 hover:text-blue-800">
<i class="fas fa-filter mr-1"></i> Filtrer
</button>
</div>
<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">Date</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Catégorie</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Montant</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 class="receipt-item hover:bg-gray-50 transition duration-150">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15/06/2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-blue-100 rounded-full flex items-center justify-center">
<i class="fas fa-file-invoice text-blue-600"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Achat fournitures</div>
<div class="text-sm text-gray-500">Bureau Depot</div>
</div>
</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">Fournitures</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">€45.20</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900 mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
</td>
</tr>
<tr class="receipt-item hover:bg-gray-50 transition duration-150">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12/06/2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-green-100 rounded-full flex items-center justify-center">
<i class="fas fa-utensils text-green-600"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Déjeuner client</div>
<div class="text-sm text-gray-500">Le Bistrot</div>
</div>
</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">Repas</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">€78.50</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900 mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
</td>
</tr>
<tr class="receipt-item hover:bg-gray-50 transition duration-150">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10/06/2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-purple-100 rounded-full flex items-center justify-center">
<i class="fas fa-plane text-purple-600"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Billet d'avion</div>
<div class="text-sm text-gray-500">Air France</div>
</div>
</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-purple-100 text-purple-800">Déplacements</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">€245.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900 mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
</td>
</tr>
<tr class="receipt-item hover:bg-gray-50 transition duration-150">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">05/06/2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-yellow-100 rounded-full flex items-center justify-center">
<i class="fas fa-laptop text-yellow-600"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Nouvel ordinateur</div>
<div class="text-sm text-gray-500">Apple Store</div>
</div>
</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-yellow-100 text-yellow-800">Équipement</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">€1,299.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900 mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="mt-4 flex justify-between items-center">
<div class="text-sm text-gray-500">
Affichage de 1 à 4 sur 24 entrées
</div>
<div class="flex space-x-1">
<button class="px-3 py-1 border rounded-lg text-gray-700 bg-gray-100">
<i class="fas fa-chevron-left"></i>
</button>
<button class="px-3 py-1 border rounded-lg bg-blue-600 text-white">1</button>
<button class="px-3 py-1 border rounded-lg text-gray-700 hover:bg-gray-100">2</button>
<button class="px-3 py-1 border rounded-lg text-gray-700 hover:bg-gray-100">3</button>
<button class="px-3 py-1 border rounded-lg text-gray-700 hover:bg-gray-100">4</button>
<button class="px-3 py-1 border rounded-lg text-gray-700 hover:bg-gray-100">
<i class="fas fa-chevron-right"></i>
</button>
</div>
</div>
</div>
</main>
</div>
<!-- Footer -->
<footer class="bg-gray-100 border-t mt-8">
<div class="container mx-auto px-4 py-6">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<div class="flex items-center">
<i class="fas fa-calculator text-blue-600 text-xl mr-2"></i>
<span class="font-semibold">Comptabilité Pro</span>
</div>
<p class="text-gray-600 text-sm mt-1">Votre solution de gestion comptable simplifiée</p>
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-600 hover:text-blue-600">Conditions</a>
<a href="#" class="text-gray-600 hover:text-blue-600">Confidentialité</a>
<a href="#" class="text-gray-600 hover:text-blue-600">Aide</a>
</div>
</div>
<div class="mt-6 pt-6 border-t border-gray-200 text-center text-sm text-gray-500">
© 2023 Comptabilité Pro. Tous droits réservés.
</div>
</div>
</footer>
<!-- Modal for receipt preview -->
<div id="receipt-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-screen overflow-auto">
<div class="flex justify-between items-center border-b p-4">
<h3 class="text-lg font-semibold">Aperçu du ticket</h3>
<button id="close-modal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6">
<img id="receipt-image" src="" alt="Ticket scanné" class="w-full h-auto mb-4 rounded-lg border">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<h4 class="font-medium mb-2">Informations</h4>
<p class="text-sm text-gray-600"><span class="font-medium">Date:</span> <span id="modal-date">15/06/2023</span></p>
<p class="text-sm text-gray-600"><span class="font-medium">Montant:</span> <span id="modal-amount">€45.20</span></p>
<p class="text-sm text-gray-600"><span class="font-medium">Catégorie:</span> <span id="modal-category">Fournitures</span></p>
</div>
<div>
<h4 class="font-medium mb-2">Description</h4>
<p id="modal-description" class="text-sm text-gray-600">Achat de fournitures de bureau pour l'équipe</p>
</div>
</div>
</div>
<div class="border-t p-4 flex justify-end space-x-3">
<button class="px-4 py-2 border rounded-lg text-gray-700 hover:bg-gray-100">Imprimer</button>
<button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">Télécharger</button>
</div>
</div>
</div>
<script>
// Mobile drawer functionality
const mobileMenuButton = document.getElementById('mobile-menu-button');
const mobileDrawer = document.getElementById('mobile-drawer');
const closeDrawerButton = document.getElementById('close-drawer');
mobileMenuButton.addEventListener('click', () => {
mobileDrawer.classList.remove('closed');
mobileDrawer.classList.add('open');
});
closeDrawerButton.addEventListener('click', () => {
mobileDrawer.classList.remove('open');
mobileDrawer.classList.add('closed');
});
// Camera functionality (simulated)
const startCameraButton = document.getElementById('start-camera');
const captureReceiptButton = document.getElementById('capture-receipt');
const cameraView = document.getElementById('camera-view');
const scanAnimation = document.getElementById('scan-animation');
startCameraButton.addEventListener('click', () => {
// Simulate camera starting
cameraView.innerHTML = `
<div class="w-full h-full bg-black flex items-center justify-center relative">
<div class="scan-animation"></div>
<div class="absolute inset-0 flex items-center justify-center">
<div class="w-64 h-40 bg-white bg-opacity-20 border-2 border-dashed border-white rounded-lg flex items-center justify-center">
<p class="text-white text-center">Positionnez le ticket<br>dans ce cadre</p>
</div>
</div>
</div>
`;
startCameraButton.classList.add('hidden');
captureReceiptButton.classList.remove('hidden');
});
captureReceiptButton.addEventListener('click', () => {
// Simulate capturing receipt
cameraView.innerHTML = `
<div class="w-full h-full bg-gray-100 flex items-center justify-center">
<div class="text-center">
<i class="fas fa-check-circle text-green-500 text-5xl mb-2"></i>
<p class="text-gray-700">Ticket capturé avec succès!</p>
</div>
</div>
`;
captureReceiptButton.classList.add('hidden');
// Fill form with sample data
const form = document.getElementById('receipt-form');
form.querySelector('input[type="number"]').value = '45.20';
form.querySelector('input[type="date"]').value = '2023-06-15';
form.querySelector('select').value = 'supplies';
form.querySelector('textarea').value = 'Achat de fournitures de bureau pour l\'équipe';
});
// Modal functionality
const viewButtons = document.querySelectorAll('.fa-eye');
const receiptModal = document.getElementById('receipt-modal');
const closeModalButton = document.getElementById('close-modal');
viewButtons.forEach(button => {
button.addEventListener('click', () => {
const row = button.closest('tr');
const date = row.querySelector('td:nth-child(1)').textContent;
const description = row.querySelector('td:nth-child(2) .text-gray-900').textContent;
const category = row.querySelector('td:nth-child(3) span').textContent;
const amount = row.querySelector('td:nth-child(4)').textContent;
document.getElementById('modal-date').textContent = date;
document.getElementById('modal-amount').textContent = amount;
document.getElementById('modal-category').textContent = category;
document.getElementById('modal-description').textContent = description;
// Set a sample image (in a real app, this would be the actual receipt image)
document.getElementById('receipt-image').src = 'https://www.veryicon.com/download/png/business/receipt-icon?fd=1';
receiptModal.classList.remove('hidden');
});
});
closeModalButton.addEventListener('click', () => {
receiptModal.classList.add('hidden');
});
// Form submission
const receiptForm = document.getElementById('receipt-form');
receiptForm.addEventListener('submit', (e) => {
e.preventDefault();
alert('Ticket enregistré avec succès!');
receiptForm.reset();
// Reset camera view
cameraView.innerHTML = `
<div class="text-center">
<i class="fas fa-camera text-4xl text-gray-400 mb-2"></i>
<p class="text-gray-500">Appuyez sur le bouton pour démarrer la caméra</p>
</div>
`;
startCameraButton.classList.remove('hidden');
captureReceiptButton.classList.add('hidden');
});
</script>
<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=Adamchab/comptabilit" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |