Essai 1 - trace brute assainie
Essai 1 - application extraite
Contenu conserve tel que produit. Seuls les chemins et adresses internes eventuels sont neutralises.
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Carnet des heures manquantes</title>
<style>
body { font-family: Arial, sans-serif; }
.event { margin-bottom: 10px; padding: 5px; border: 1px solid #ccc; }
.filter { margin-bottom: 20px; }
.summary { margin-top: 20px; font-weight: bold; }
</style>
</head>
<body>
<div class="filter">
<button onclick="filterEvents('all')">Tous</button>
<button onclick="filterEvents('note')">Notes</button>
<button onclick="filterEvents('decision')">Décisions</button>
<button onclick="filterEvents('question')">Questions</button>
</div>
<div id="events"></div>
<div class="summary" id="summary"></div>
<script>
const events = [
{ heure: '09:10', type: 'note', texte: 'Café, reprise du chantier WSL.' },
{ heure: '11:40', type: 'decision', texte: 'Garder le local comme socle principal.' },
{ heure: '18:05', type: 'question', texte: 'Quel modèle léger utiliser pour les brouillons ?' },
{ heure: '23:20', type: 'note', texte: '' }
];
function displayEvents(filter = 'all') {
const eventContainer = document.getElementById('events');
eventContainer.innerHTML = '';
events.forEach(event => {
if (filter === 'all' || filter === event.type) {
const eventElement = document.createElement('div');
eventElement.className = `event ${event.type}`;
eventElement.textContent = `${event.heure} - ${event.texte || 'Texte manquant'}`;
eventContainer.appendChild(eventElement);
}
});
}
function filterEvents(type) {
displayEvents(type);
updateSummary();
}
function updateSummary() {
const summary = document.getElementById('summary');
const totalNotes = events.filter(e => e.type === 'note').length;
const totalDecisions = events.filter(e => e.type === 'decision').length;
const totalQuestions = events.filter(e => e.type === 'question').length;
summary.textContent = `Notes: ${totalNotes}, Décisions: ${totalDecisions}, Questions: ${totalQuestions}`;
}
document.addEventListener('DOMContentLoaded', () => {
displayEvents();
updateSummary();
});
</script>
</body>
</html>