Spaces:
Running
Running
Je voudrais que le panneau latéral ait son titre ainsi que les bouton fermer et enregistrer qui soient sticky - Initial Deployment
Browse filesFiles changed (2)
- README.md+7-5
- index.html+609-19
123452345678910111012---title: Evaluteo 2emoji: 🏆colorFrom: greencolorTo: redtitle: evaluteo-2emoji: 🐳colorFrom: yellowcolorTo: greensdk: staticpinned: falsetags: - deepsite---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-referenceCheck out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12345678910111213141516171819123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609<!doctype html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. </p> </div> </body></html><!DOCTYPE html><html lang="fr"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tableau de gestion des risques</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> /* Custom styles for scrollbar and sidebar transition */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: #f1f1f1; } ::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #555; } .sidebar { transition: transform 0.3s ease-in-out; } .sidebar-hidden { transform: translateX(100%); } .sidebar-visible { transform: translateX(0); } .row-highlight:hover { background-color: #f0f9ff; cursor: pointer; } .modal-overlay { background-color: rgba(0, 0, 0, 0.5); transition: opacity 0.3s ease; } .filter-dropdown { max-height: 300px; overflow-y: auto; } </style></head><body class="bg-gray-50 font-sans"> <!-- Header Sticky --> <header class="sticky top-0 z-50 bg-white shadow-md"> <div class="container mx-auto px-4 py-3 flex items-center justify-between"> <div class="flex items-center space-x-4"> <h1 class="text-xl font-bold text-blue-600">RiskManager Pro</h1> </div> <div class="relative w-1/3"> <input type="text" placeholder="Rechercher..." class="w-full pl-10 pr-4 py-2 rounded-lg border border-gray-300 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> <div class="flex items-center space-x-4"> <div class="relative"> <button class="flex items-center space-x-2 text-gray-700 hover:text-blue-600"> <i class="fas fa-bell text-xl"></i> </button> <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">3</span> </div> <div class="flex items-center space-x-2"> <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="h-8 w-8 rounded-full"> <span class="font-medium">Sarah Dupont</span> </div> </div> </div> </header>
<!-- Breadcrumb --> <div class="bg-gray-100 py-2 px-4 border-b"> <div class="container mx-auto"> <nav class="flex" aria-label="Breadcrumb"> <ol class="inline-flex items-center space-x-1 md:space-x-3"> <li class="inline-flex items-center"> <a href="#" class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600"> <i class="fas fa-home mr-2"></i> Accueil </a> </li> <li> <div class="flex items-center"> <i class="fas fa-chevron-right text-gray-400"></i> <a href="#" class="ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2">Risques</a> </div> </li> <li aria-current="page"> <div class="flex items-center"> <i class="fas fa-chevron-right text-gray-400"></i> <span class="ml-1 text-sm font-medium text-blue-600 md:ml-2">Tableau des risques</span> </div> </li> </ol> </nav> </div> </div>
<!-- Main Content --> <main class="container mx-auto px-4 py-6"> <!-- Filters and Actions --> <div class="mb-6 flex flex-col md:flex-row justify-between items-start md:items-center space-y-4 md:space-y-0"> <h2 class="text-2xl font-bold text-gray-800">Tableau des risques</h2> <div class="flex space-x-3"> <button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 flex items-center"> <i class="fas fa-plus mr-2"></i> Ajouter un risque </button> <button class="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-100 flex items-center"> <i class="fas fa-download mr-2"></i> Exporter </button> </div> </div>
<!-- Table Filters --> <div class="bg-white p-4 rounded-lg shadow-sm mb-4"> <div class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Tâche</label> <div class="relative"> <button onclick="toggleFilter('task')" class="w-full flex justify-between items-center px-3 py-2 bg-white border border-gray-300 rounded-md shadow-sm text-left text-sm focus:outline-none focus:ring-1 focus:ring-blue-500"> <span>Toutes les tâches</span> <i class="fas fa-chevron-down"></i> </button> <div id="task-filter" class="hidden absolute z-10 mt-1 w-full bg-white shadow-lg rounded-md py-1 filter-dropdown"> <input type="text" placeholder="Rechercher..." class="w-full px-3 py-2 border-b"> <div class="max-h-48 overflow-y-auto"> <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Tâche 1</a> <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Tâche 2</a> <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Tâche 3</a> </div> </div> </div> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Danger</label> <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"> <option>Tous les dangers</option> <option>Biologique</option> <option>Chimique</option> <option>Déplacement</option> <option>Ambiance de travail</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Statut</label> <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"> <option>Tous les statuts</option> <option>À traiter</option> <option>En cours</option> <option>Résolu</option> <option>Archivé</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Tri</label> <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"> <option>Par défaut</option> <option>Cotation brute (croissant)</option> <option>Cotation brute (décroissant)</option> <option>Cotation réelle (croissant)</option> <option>Cotation réelle (décroissant)</option> </select> </div> </div> </div>
<!-- Table --> <div class="bg-white shadow-sm rounded-lg overflow-hidden"> <div class="overflow-x-auto"> <table class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"> <div class="flex items-center"> Tâche <i class="fas fa-sort ml-1 text-gray-400"></i> </div> </th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"> <div class="flex items-center"> Danger <i class="fas fa-sort ml-1 text-gray-400"></i> </div> </th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"> <div class="flex items-center"> Situation <i class="fas fa-sort ml-1 text-gray-400"></i> </div> </th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"> <div class="flex items-center"> Risque <i class="fas fa-sort ml-1 text-gray-400"></i> </div> </th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"> <div class="flex items-center"> Cotation brute <i class="fas fa-sort ml-1 text-gray-400"></i> </div> </th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"> <div class="flex items-center"> Mesure <i class="fas fa-sort ml-1 text-gray-400"></i> </div> </th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"> <div class="flex items-center"> Cotation réelle <i class="fas fa-sort ml-1 text-gray-400"></i> </div> </th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"> <div class="flex items-center"> Statut <i class="fas fa-sort ml-1 text-gray-400"></i> </div> </th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <!-- Row 1 --> <tr class="row-highlight" onclick="openSidebar(1)"> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Manipulation produits chimiques</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Chimique</span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Laboratoire</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Brûlure chimique</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <div class="flex items-center"> <div class="h-2 w-16 bg-gray-200 rounded-full"> <div class="h-2 bg-yellow-500 rounded-full" style="width: 70%"></div> </div> <span class="ml-2">14</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Gants, lunettes</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <div class="flex items-center"> <div class="h-2 w-16 bg-gray-200 rounded-full"> <div class="h-2 bg-green-500 rounded-full" style="width: 30%"></div> </div> <span class="ml-2">6</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">En cours</span> </td> </tr> <!-- Row 2 --> <tr class="row-highlight" onclick="openSidebar(2)"> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Nettoyage salle blanche</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">Biologique</span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Zone stérile</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Contamination</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <div class="flex items-center"> <div class="h-2 w-16 bg-gray-200 rounded-full"> <div class="h-2 bg-red-500 rounded-full" style="width: 90%"></div> </div> <span class="ml-2">18</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Protocole strict</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <div class="flex items-center"> <div class="h-2 w-16 bg-gray-200 rounded-full"> <div class="h-2 bg-green-500 rounded-full" style="width: 20%"></div> </div> <span class="ml-2">4</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Résolu</span> </td> </tr> <!-- Row 3 --> <tr class="row-highlight" onclick="openSidebar(3)"> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Déplacement chariot</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Déplacement</span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Couloir étroit</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Collision</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <div class="flex items-center"> <div class="h-2 w-16 bg-gray-200 rounded-full"> <div class="h-2 bg-orange-500 rounded-full" style="width: 50%"></div> </div> <span class="ml-2">10</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Signalisation</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <div class="flex items-center"> <div class="h-2 w-16 bg-gray-200 rounded-full"> <div class="h-2 bg-green-500 rounded-full" style="width: 20%"></div> </div> <span class="ml-2">4</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">À traiter</span> </td> </tr> <!-- Row 4 --> <tr class="row-highlight" onclick="openSidebar(4)"> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Poste informatique</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-indigo-100 text-indigo-800">Ambiance</span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Bureau open space</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">TMS</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <div class="flex items-center"> <div class="h-2 w-16 bg-gray-200 rounded-full"> <div class="h-2 bg-yellow-500 rounded-full" style="width: 60%"></div> </div> <span class="ml-2">12</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Chaise ergonomique</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <div class="flex items-center"> <div class="h-2 w-16 bg-gray-200 rounded-full"> <div class="h-2 bg-green-500 rounded-full" style="width: 30%"></div> </div> <span class="ml-2">6</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">En cours</span> </td> </tr> </tbody> </table> </div> <!-- Pagination --> <div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6"> <div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"> <div> <p class="text-sm text-gray-700"> Affichage de <span class="font-medium">1</span> à <span class="font-medium">4</span> sur <span class="font-medium">12</span> résultats </p> </div> <div> <nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination"> <a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"> <span class="sr-only">Précédent</span> <i class="fas fa-chevron-left"></i> </a> <a href="#" aria-current="page" class="z-10 bg-blue-50 border-blue-500 text-blue-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 1 </a> <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 2 </a> <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 3 </a> <span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700"> ... </span> <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 8 </a> <a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"> <span class="sr-only">Suivant</span> <i class="fas fa-chevron-right"></i> </a> </nav> </div> </div> </div> </div> </main>
<!-- Sidebar for editing --> <div id="sidebar-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden modal-overlay" onclick="closeSidebar()"></div> <div id="edit-sidebar" class="sidebar sidebar-hidden fixed top-0 right-0 z-50 w-full sm:w-96 h-full bg-white shadow-xl flex flex-col"> <!-- Sticky Header --> <div class="sticky top-0 bg-white p-6 border-b z-10"> <div class="flex justify-between items-center"> <h3 class="text-lg font-bold text-gray-900">Modifier le risque</h3> <button id="close-sidebar" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> </div> <!-- Scrollable Content --> <div class="flex-1 overflow-y-auto p-6"> <div class="space-y-6"> <!-- Task Section --> <div> <h4 class="text-md font-medium text-gray-900 mb-3 border-b pb-2">Tâche</h4> <div class="space-y-4"> <div> <label for="task-description" class="block text-sm font-medium text-gray-700 mb-1">Description</label> <textarea id="task-description" rows="3" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"></textarea> </div> <div> <label for="task-comment" class="block text-sm font-medium text-gray-700 mb-1">Commentaire</label> <textarea id="task-comment" rows="2" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"></textarea> </div> </div> </div> <!-- Danger Section --> <div> <h4 class="text-md font-medium text-gray-900 mb-3 border-b pb-2">Danger</h4> <div class="space-y-4"> <div> <label for="biological" class="block text-sm font-medium text-gray-700 mb-1">Biologique</label> <select id="biological" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"> <option value="">Sélectionner...</option> <option>Bactéries</option> <option>Virus</option> <option>Parasites</option> <option>Champignons</option> <option>Toxines biologiques</option> </select> </div> <div> <label for="chemical" class="block text-sm font-medium text-gray-700 mb-1">Chimique</label> <select id="chemical" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"> <option value="">Sélectionner...</option> <option>Solvants</option> <option>Acides</option> <option>Bases</option> <option>Métaux lourds</option> <option>Pesticides</option> </select> </div> <div> <label for="movement" class="block text-sm font-medium text-gray-700 mb-1">Déplacement</label> <select id="movement" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"> <option value="">Sélectionner...</option> <option>Chute de plain-pied</option> <option>Chute de hauteur</option> <option>Heurt par objet</option> <option>Collision</option> <option>Glissade</option> </select> </div> <div> <label for="environment" class="block text-sm font-medium text-gray-700 mb-1">Ambiance de travail</label> <select id="environment" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"> <option value="">Sélectionner...</option> <option>Bruit</option> <option>Lumière</option> <option>Température</option> <option>Humidité</option> <option>Charge mentale</option> </select> </div> </div> </div> <!-- Content remains here --> </div> </div> <!-- Sticky Footer with Action Buttons --> <div class="sticky bottom-0 bg-white p-4 border-t z-10"> <div class="flex space-x-3"> <button id="cancel-button" type="button" class="flex-1 px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> Fermer </button> <button id="save-button" type="button" class="flex-1 px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> Enregistrer </button> </div> </div> </div> </div>
<script> // Toggle filter dropdown function toggleFilter(filterId) { const filter = document.getElementById(`${filterId}-filter`); filter.classList.toggle('hidden'); } // Close all filter dropdowns when clicking outside document.addEventListener('click', function(event) { if (!event.target.matches('button[onclick^="toggleFilter"]')) { const dropdowns = document.querySelectorAll('.filter-dropdown'); dropdowns.forEach(function(dropdown) { if (!dropdown.classList.contains('hidden')) { dropdown.classList.add('hidden'); } }); } }); // Sidebar functions let currentRowId = null; function openSidebar(rowId) { currentRowId = rowId; document.getElementById('sidebar-overlay').classList.remove('hidden'); document.getElementById('edit-sidebar').classList.remove('sidebar-hidden'); document.getElementById('edit-sidebar').classList.add('sidebar-visible'); // Simulate loading data for the selected row loadRowData(rowId); } function closeSidebar() { document.getElementById('sidebar-overlay').classList.add('hidden'); document.getElementById('edit-sidebar').classList.remove('sidebar-visible'); document.getElementById('edit-sidebar').classList.add('sidebar-hidden'); } function loadRowData(rowId) { // In a real app, this would fetch data from an API // Here we just simulate with some sample data const sampleData = { 1: { description: "Manipulation produits chimiques", comment: "Attention aux produits corrosifs", biological: "", chemical: "Acides", movement: "", environment: "" }, 2: { description: "Nettoyage salle blanche", comment: "Respecter le protocole de stérilisation", biological: "Bactéries", chemical: "", movement: "", environment: "" }, 3: { description: "Déplacement chariot", comment: "Couloirs encombrés", biological: "", chemical: "", movement: "Collision", environment: "" }, 4: { description: "Poste informatique", comment: "Problèmes de posture fréquents", biological: "", chemical: "", movement: "", environment: "Charge mentale" } }; const data = sampleData[rowId] || {}; document.getElementById('task-description').value = data.description || ''; document.getElementById('task-comment').value = data.comment || ''; document.getElementById('biological').value = data.biological || ''; document.getElementById('chemical').value = data.chemical || ''; document.getElementById('movement').value = data.movement || ''; document.getElementById('environment').value = data.environment || ''; } // Event listeners for sidebar buttons document.getElementById('close-sidebar').addEventListener('click', closeSidebar); document.getElementById('cancel-button').addEventListener('click', closeSidebar); document.getElementById('save-button').addEventListener('click', function() { // In a real app, this would save the data alert('Modifications enregistrées pour le risque #' + currentRowId); closeSidebar(); }); // Prevent closing sidebar when clicking inside it document.getElementById('edit-sidebar').addEventListener('click', function(e) { e.stopPropagation(); }); </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=LoicUX/evaluteo-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>README.md+7-5
index.html+609-19