Add 2 files
Browse files- README.md +7 -5
- index.html +776 -18
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 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: test5
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: gray
|
| 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,777 @@
|
|
| 1 |
-
<!
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Outil de Détection de Fraudes</title>
|
| 6 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 7 |
+
<!-- Bootstrap CSS via CDN -->
|
| 8 |
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
| 9 |
+
<!-- Font Awesome for icons -->
|
| 10 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 11 |
+
<style>
|
| 12 |
+
body {
|
| 13 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 14 |
+
background-color: #f8f9fa;
|
| 15 |
+
}
|
| 16 |
+
#sidebar {
|
| 17 |
+
height: 100vh;
|
| 18 |
+
position: fixed;
|
| 19 |
+
top: 0;
|
| 20 |
+
left: 0;
|
| 21 |
+
width: 220px;
|
| 22 |
+
background: linear-gradient(180deg, #2c3e50 0%, #1a1a2e 100%);
|
| 23 |
+
color: #fff;
|
| 24 |
+
padding-top: 20px;
|
| 25 |
+
box-shadow: 2px 0 10px rgba(0,0,0,0.1);
|
| 26 |
+
}
|
| 27 |
+
#sidebar .nav-link {
|
| 28 |
+
color: #e2e8f0;
|
| 29 |
+
padding: 12px 20px;
|
| 30 |
+
margin: 2px 0;
|
| 31 |
+
border-radius: 4px;
|
| 32 |
+
transition: all 0.3s ease;
|
| 33 |
+
}
|
| 34 |
+
#sidebar .nav-link:hover {
|
| 35 |
+
background: rgba(255,255,255,0.1);
|
| 36 |
+
transform: translateX(5px);
|
| 37 |
+
}
|
| 38 |
+
#sidebar .nav-link.active {
|
| 39 |
+
background: rgba(255,255,255,0.15);
|
| 40 |
+
border-left: 4px solid #4299e1;
|
| 41 |
+
}
|
| 42 |
+
#content {
|
| 43 |
+
margin-left: 240px;
|
| 44 |
+
padding: 30px;
|
| 45 |
+
background-color: white;
|
| 46 |
+
min-height: 100vh;
|
| 47 |
+
box-shadow: -2px 0 10px rgba(0,0,0,0.05);
|
| 48 |
+
}
|
| 49 |
+
.section {
|
| 50 |
+
display: none;
|
| 51 |
+
animation: fadeIn 0.3s ease;
|
| 52 |
+
}
|
| 53 |
+
@keyframes fadeIn {
|
| 54 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 55 |
+
to { opacity: 1; transform: translateY(0); }
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
/* Enhanced table styling */
|
| 59 |
+
.enhanced-table {
|
| 60 |
+
width: 100%;
|
| 61 |
+
border-collapse: separate;
|
| 62 |
+
border-spacing: 0;
|
| 63 |
+
margin: 20px 0;
|
| 64 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 65 |
+
border-radius: 8px;
|
| 66 |
+
overflow: hidden;
|
| 67 |
+
}
|
| 68 |
+
.enhanced-table thead th {
|
| 69 |
+
background-color: #2c3e50;
|
| 70 |
+
color: white;
|
| 71 |
+
padding: 12px 15px;
|
| 72 |
+
text-align: left;
|
| 73 |
+
font-weight: 600;
|
| 74 |
+
position: sticky;
|
| 75 |
+
top: 0;
|
| 76 |
+
}
|
| 77 |
+
.enhanced-table tbody tr {
|
| 78 |
+
transition: all 0.2s ease;
|
| 79 |
+
}
|
| 80 |
+
.enhanced-table tbody tr:hover {
|
| 81 |
+
background-color: rgba(66, 153, 225, 0.1);
|
| 82 |
+
}
|
| 83 |
+
.enhanced-table tbody td {
|
| 84 |
+
padding: 12px 15px;
|
| 85 |
+
border-bottom: 1px solid #e2e8f0;
|
| 86 |
+
vertical-align: middle;
|
| 87 |
+
}
|
| 88 |
+
.enhanced-table tbody tr:last-child td {
|
| 89 |
+
border-bottom: none;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
/* Custom scrollbar */
|
| 93 |
+
::-webkit-scrollbar {
|
| 94 |
+
width: 8px;
|
| 95 |
+
height: 8px;
|
| 96 |
+
}
|
| 97 |
+
::-webkit-scrollbar-track {
|
| 98 |
+
background: #f1f1f1;
|
| 99 |
+
}
|
| 100 |
+
::-webkit-scrollbar-thumb {
|
| 101 |
+
background: #cbd5e0;
|
| 102 |
+
border-radius: 4px;
|
| 103 |
+
}
|
| 104 |
+
::-webkit-scrollbar-thumb:hover {
|
| 105 |
+
background: #a0aec0;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
/* Tab styling */
|
| 109 |
+
.nav-tabs .nav-link {
|
| 110 |
+
color: #4a5568;
|
| 111 |
+
font-weight: 500;
|
| 112 |
+
border: none;
|
| 113 |
+
padding: 12px 20px;
|
| 114 |
+
margin-right: 5px;
|
| 115 |
+
}
|
| 116 |
+
.nav-tabs .nav-link.active {
|
| 117 |
+
color: #2c3e50;
|
| 118 |
+
border-bottom: 3px solid #2c3e50;
|
| 119 |
+
background-color: transparent;
|
| 120 |
+
}
|
| 121 |
+
.nav-tabs .nav-link:hover:not(.active) {
|
| 122 |
+
border-bottom: 3px solid #e2e8f0;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
/* Button styling */
|
| 126 |
+
.btn {
|
| 127 |
+
transition: all 0.2s ease;
|
| 128 |
+
font-weight: 500;
|
| 129 |
+
padding: 8px 16px;
|
| 130 |
+
}
|
| 131 |
+
.btn-primary {
|
| 132 |
+
background-color: #2c3e50;
|
| 133 |
+
border-color: #2c3e50;
|
| 134 |
+
}
|
| 135 |
+
.btn-primary:hover {
|
| 136 |
+
background-color: #1a1a2e;
|
| 137 |
+
border-color: #1a1a2e;
|
| 138 |
+
transform: translateY(-2px);
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
/* Card styling */
|
| 142 |
+
.card {
|
| 143 |
+
border: none;
|
| 144 |
+
border-radius: 8px;
|
| 145 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 146 |
+
transition: all 0.3s ease;
|
| 147 |
+
}
|
| 148 |
+
.card:hover {
|
| 149 |
+
transform: translateY(-3px);
|
| 150 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
/* Responsive adjustments */
|
| 154 |
+
@media (max-width: 992px) {
|
| 155 |
+
#sidebar {
|
| 156 |
+
width: 180px;
|
| 157 |
+
}
|
| 158 |
+
#content {
|
| 159 |
+
margin-left: 200px;
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
@media (max-width: 768px) {
|
| 163 |
+
#sidebar {
|
| 164 |
+
width: 100%;
|
| 165 |
+
height: auto;
|
| 166 |
+
position: relative;
|
| 167 |
+
}
|
| 168 |
+
#content {
|
| 169 |
+
margin-left: 0;
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
</style>
|
| 173 |
+
<!-- DataTables CSS -->
|
| 174 |
+
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.css">
|
| 175 |
+
</head>
|
| 176 |
+
<body>
|
| 177 |
+
<div class="container-fluid">
|
| 178 |
+
<div class="row">
|
| 179 |
+
<!-- Menu latéral -->
|
| 180 |
+
<nav id="sidebar" class="col-md-2 d-none d-md-block sidebar">
|
| 181 |
+
<div class="sidebar-sticky">
|
| 182 |
+
<div class="text-center mb-4">
|
| 183 |
+
<h4 class="font-bold text-xl text-white">IRS Enquête</h4>
|
| 184 |
+
<p class="text-xs text-gray-300">Outil de Détection de Fraudes</p>
|
| 185 |
+
</div>
|
| 186 |
+
<ul class="nav flex-column">
|
| 187 |
+
<li class="nav-item"><a class="nav-link" href="#" onclick="showSection('home')"><i class="fas fa-home mr-2"></i>Accueil</a></li>
|
| 188 |
+
<li class="nav-item"><a class="nav-link" href="#" onclick="showSection('import')"><i class="fas fa-file-import mr-2"></i>Importer CSV</a></li>
|
| 189 |
+
<li class="nav-item"><a class="nav-link" href="#" onclick="showSection('filter')"><i class="fas fa-filter mr-2"></i>Filtrer & Rapport</a></li>
|
| 190 |
+
<li class="nav-item"><a class="nav-link active" href="#" onclick="showSection('lecture')"><i class="fas fa-book-reader mr-2"></i>Lecture</a></li>
|
| 191 |
+
<li class="nav-item"><a class="nav-link" href="#" onclick="showSection('export')"><i class="fas fa-file-export mr-2"></i>Exporter Rapport</a></li>
|
| 192 |
+
<li class="nav-item"><a class="nav-link" href="#" onclick="showSection('favorites')"><i class="fas fa-star mr-2"></i>Favoris</a></li>
|
| 193 |
+
<li class="nav-item"><a class="nav-link" href="#" onclick="showSection('logs')"><i class="fas fa-clipboard-list mr-2"></i>Logs</a></li>
|
| 194 |
+
</ul>
|
| 195 |
+
</div>
|
| 196 |
+
</nav>
|
| 197 |
+
|
| 198 |
+
<!-- Contenu principal -->
|
| 199 |
+
<main id="content" class="col-md-9 ml-sm-auto col-lg-10 px-4">
|
| 200 |
+
<!-- Section Accueil -->
|
| 201 |
+
<div id="section-home" class="section">
|
| 202 |
+
<div class="flex items-center mb-6">
|
| 203 |
+
<h2 class="text-2xl font-bold text-gray-800">Accueil</h2>
|
| 204 |
+
<span class="ml-2 text-blue-500"><i class="fas fa-home"></i></span>
|
| 205 |
+
</div>
|
| 206 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 207 |
+
<p class="text-gray-700">Bienvenue dans l'outil de détection de fraudes IRS Enquête. Utilisez le menu pour naviguer entre les fonctionnalités.</p>
|
| 208 |
+
<div class="mt-4 grid grid-cols-1 md:grid-cols-3 gap-4">
|
| 209 |
+
<div class="bg-blue-50 p-4 rounded-lg border border-blue-100">
|
| 210 |
+
<h3 class="font-semibold text-blue-800"><i class="fas fa-file-import mr-2"></i>Importation</h3>
|
| 211 |
+
<p class="text-sm text-blue-600 mt-2">Importez vos fichiers CSV pour commencer l'analyse.</p>
|
| 212 |
+
</div>
|
| 213 |
+
<div class="bg-green-50 p-4 rounded-lg border border-green-100">
|
| 214 |
+
<h3 class="font-semibold text-green-800"><i class="fas fa-filter mr-2"></i>Filtrage</h3>
|
| 215 |
+
<p class="text-sm text-green-600 mt-2">Filtrez les données selon différents critères.</p>
|
| 216 |
+
</div>
|
| 217 |
+
<div class="bg-purple-50 p-4 rounded-lg border border-purple-100">
|
| 218 |
+
<h3 class="font-semibold text-purple-800"><i class="fas fa-chart-bar mr-2"></i>Analyse</h3>
|
| 219 |
+
<p class="text-sm text-purple-600 mt-2">Visualisez les résultats sous forme de tableaux et graphiques.</p>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
</div>
|
| 223 |
+
</div>
|
| 224 |
+
|
| 225 |
+
<!-- Section Import CSV -->
|
| 226 |
+
<div id="section-import" class="section">
|
| 227 |
+
<div class="flex items-center mb-6">
|
| 228 |
+
<h2 class="text-2xl font-bold text-gray-800">Importer CSV</h2>
|
| 229 |
+
<span class="ml-2 text-blue-500"><i class="fas fa-file-import"></i></span>
|
| 230 |
+
</div>
|
| 231 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 232 |
+
<div class="form-group">
|
| 233 |
+
<label for="csvInput" class="font-medium text-gray-700">Collez le contenu du CSV (séparateur ;) :</label>
|
| 234 |
+
<textarea class="form-control mt-1" id="csvInput" rows="10" style="border-radius: 6px; border: 1px solid #e2e8f0;"></textarea>
|
| 235 |
+
</div>
|
| 236 |
+
<button class="btn btn-primary mt-3" onclick="importCSV()">
|
| 237 |
+
<i class="fas fa-upload mr-2"></i>Importer
|
| 238 |
+
</button>
|
| 239 |
+
<div id="importResult" class="mt-4"></div>
|
| 240 |
+
</div>
|
| 241 |
+
</div>
|
| 242 |
+
|
| 243 |
+
<!-- Section Filtrer & Rapport -->
|
| 244 |
+
<div id="section-filter" class="section">
|
| 245 |
+
<div class="flex items-center mb-6">
|
| 246 |
+
<h2 class="text-2xl font-bold text-gray-800">Filtrer & Générer Rapport</h2>
|
| 247 |
+
<span class="ml-2 text-blue-500"><i class="fas fa-filter"></i></span>
|
| 248 |
+
</div>
|
| 249 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 250 |
+
<form id="filterForm">
|
| 251 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 252 |
+
<div class="form-group">
|
| 253 |
+
<label for="dateDebut" class="font-medium text-gray-700">Date début :</label>
|
| 254 |
+
<input type="date" class="form-control mt-1" id="dateDebut" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 255 |
+
</div>
|
| 256 |
+
<div class="form-group">
|
| 257 |
+
<label for="dateFin" class="font-medium text-gray-700">Date fin :</label>
|
| 258 |
+
<input type="date" class="form-control mt-1" id="dateFin" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 259 |
+
</div>
|
| 260 |
+
</div>
|
| 261 |
+
|
| 262 |
+
<div class="form-group mt-4">
|
| 263 |
+
<label for="filterText" class="font-medium text-gray-700">Filtrer par Raison (séparez plusieurs critères par ";") :</label>
|
| 264 |
+
<input type="text" class="form-control mt-1" id="filterText" placeholder="ex: Paiement facture;Transfère" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 265 |
+
</div>
|
| 266 |
+
|
| 267 |
+
<div class="form-group mt-4">
|
| 268 |
+
<label for="filterIndicator" class="font-medium text-gray-700">Filtrer par Indicateur (Initiateur) :</label>
|
| 269 |
+
<input type="text" class="form-control mt-1" id="filterIndicator" placeholder="ex: 68484" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 270 |
+
</div>
|
| 271 |
+
|
| 272 |
+
<div class="form-group mt-4">
|
| 273 |
+
<label class="font-medium text-gray-700">Filtrer par Montant :</label>
|
| 274 |
+
<div class="space-y-3 mt-2">
|
| 275 |
+
<div class="form-check">
|
| 276 |
+
<input class="form-check-input" type="radio" name="amountFilterMode" id="amountNone" value="none" checked>
|
| 277 |
+
<label class="form-check-label ml-2 text-gray-700" for="amountNone">Aucun filtre</label>
|
| 278 |
+
</div>
|
| 279 |
+
<div class="form-check">
|
| 280 |
+
<input class="form-check-input" type="radio" name="amountFilterMode" id="amountGreaterRadio" value="greater">
|
| 281 |
+
<label class="form-check-label ml-2 text-gray-700" for="amountGreaterRadio">Montant supérieur à</label>
|
| 282 |
+
<input type="number" class="form-control mt-1 ml-4" id="amountGreater" placeholder="Valeur" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 283 |
+
</div>
|
| 284 |
+
<div class="form-check">
|
| 285 |
+
<input class="form-check-input" type="radio" name="amountFilterMode" id="amountLessRadio" value="less">
|
| 286 |
+
<label class="form-check-label ml-2 text-gray-700" for="amountLessRadio">Montant inférieur à</label>
|
| 287 |
+
<input type="number" class="form-control mt-1 ml-4" id="amountLess" placeholder="Valeur" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 288 |
+
</div>
|
| 289 |
+
<div class="form-check">
|
| 290 |
+
<input class="form-check-input" type="radio" name="amountFilterMode" id="amountBetweenRadio" value="between">
|
| 291 |
+
<label class="form-check-label ml-2 text-gray-700" for="amountBetweenRadio">Montant entre</label>
|
| 292 |
+
<div class="flex items-center mt-1 ml-4">
|
| 293 |
+
<input type="number" class="form-control mr-2" id="amountMin" placeholder="Min" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 294 |
+
<span class="text-gray-500 mx-1">et</span>
|
| 295 |
+
<input type="number" class="form-control ml-2" id="amountMax" placeholder="Max" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 296 |
+
</div>
|
| 297 |
+
</div>
|
| 298 |
+
</div>
|
| 299 |
+
</div>
|
| 300 |
+
|
| 301 |
+
<div class="flex flex-wrap gap-3 mt-6">
|
| 302 |
+
<button type="button" class="btn btn-primary" onclick="generateReport()">
|
| 303 |
+
<i class="fas fa-file-alt mr-2"></i>Générer Rapport complet
|
| 304 |
+
</button>
|
| 305 |
+
<button type="button" class="btn btn-danger" onclick="resetReportsUI()">
|
| 306 |
+
<i class="fas fa-redo mr-2"></i>Remise à zéro des rapports
|
| 307 |
+
</button>
|
| 308 |
+
</div>
|
| 309 |
+
</form>
|
| 310 |
+
<div id="reportResult" class="mt-6"></div>
|
| 311 |
+
</div>
|
| 312 |
+
</div>
|
| 313 |
+
|
| 314 |
+
<!-- Section Lecture -->
|
| 315 |
+
<div id="section-lecture" class="section">
|
| 316 |
+
<div class="flex items-center mb-6">
|
| 317 |
+
<h2 class="text-2xl font-bold text-gray-800">Lecture des Rapports</h2>
|
| 318 |
+
<span class="ml-2 text-blue-500"><i class="fas fa-book-reader"></i></span>
|
| 319 |
+
</div>
|
| 320 |
+
|
| 321 |
+
<!-- Onglets -->
|
| 322 |
+
<ul class="nav nav-tabs" id="lectureTabs" role="tablist">
|
| 323 |
+
<li class="nav-item">
|
| 324 |
+
<a class="nav-link active" id="tab-rapport" data-toggle="tab" href="#view-rapport" role="tab">
|
| 325 |
+
<i class="fas fa-file-alt mr-2"></i>Rapport
|
| 326 |
+
</a>
|
| 327 |
+
</li>
|
| 328 |
+
<li class="nav-item">
|
| 329 |
+
<a class="nav-link" id="tab-group" data-toggle="tab" href="#view-group" role="tab">
|
| 330 |
+
<i class="fas fa-users mr-2"></i>Par groupe
|
| 331 |
+
</a>
|
| 332 |
+
</li>
|
| 333 |
+
<li class="nav-item">
|
| 334 |
+
<a class="nav-link" id="tab-indicator" data-toggle="tab" href="#view-indicator" role="tab">
|
| 335 |
+
<i class="fas fa-chart-line mr-2"></i>Par indicateur
|
| 336 |
+
</a>
|
| 337 |
+
</li>
|
| 338 |
+
<li class="nav-item">
|
| 339 |
+
<a class="nav-link" id="tab-graphs" data-toggle="tab" href="#view-graphs" role="tab">
|
| 340 |
+
<i class="fas fa-chart-pie mr-2"></i>Graphiques
|
| 341 |
+
</a>
|
| 342 |
+
</li>
|
| 343 |
+
</ul>
|
| 344 |
+
|
| 345 |
+
<div class="tab-content bg-white rounded-b-lg rounded-tr-lg shadow p-6" id="lectureTabsContent">
|
| 346 |
+
<div class="tab-pane fade show active" id="view-rapport" role="tabpanel">
|
| 347 |
+
<button class="btn btn-info mb-4" onclick="loadReportData()">
|
| 348 |
+
<i class="fas fa-sync-alt mr-2"></i>Rafraîchir Rapport
|
| 349 |
+
</button>
|
| 350 |
+
<div id="reportDataDiv" class="mt-2 overflow-x-auto">
|
| 351 |
+
<!-- Table will be inserted here -->
|
| 352 |
+
</div>
|
| 353 |
+
</div>
|
| 354 |
+
<div class="tab-pane fade" id="view-group" role="tabpanel">
|
| 355 |
+
<button class="btn btn-info mb-4" onclick="loadGroupData()">
|
| 356 |
+
<i class="fas fa-sync-alt mr-2"></i>Rafraîchir Par groupe
|
| 357 |
+
</button>
|
| 358 |
+
<div id="groupDataDiv" class="mt-2 overflow-x-auto">
|
| 359 |
+
<!-- Table will be inserted here -->
|
| 360 |
+
</div>
|
| 361 |
+
</div>
|
| 362 |
+
<div class="tab-pane fade" id="view-indicator" role="tabpanel">
|
| 363 |
+
<button class="btn btn-info mb-4" onclick="loadIndicatorData()">
|
| 364 |
+
<i class="fas fa-sync-alt mr-2"></i>Rafraîchir Par indicateur
|
| 365 |
+
</button>
|
| 366 |
+
<div id="indicatorDataDiv" class="mt-2 overflow-x-auto">
|
| 367 |
+
<!-- Table will be inserted here -->
|
| 368 |
+
</div>
|
| 369 |
+
</div>
|
| 370 |
+
<div class="tab-pane fade" id="view-graphs" role="tabpanel">
|
| 371 |
+
<button class="btn btn-info mb-4" onclick="loadGraphs()">
|
| 372 |
+
<i class="fas fa-sync-alt mr-2"></i>Rafraîchir Graphiques
|
| 373 |
+
</button>
|
| 374 |
+
<div id="graphsDiv" class="mt-2">
|
| 375 |
+
<!-- Graphs will be inserted here -->
|
| 376 |
+
</div>
|
| 377 |
+
</div>
|
| 378 |
+
</div>
|
| 379 |
+
</div>
|
| 380 |
+
|
| 381 |
+
<!-- Section Export -->
|
| 382 |
+
<div id="section-export" class="section">
|
| 383 |
+
<div class="flex items-center mb-6">
|
| 384 |
+
<h2 class="text-2xl font-bold text-gray-800">Exporter Rapport</h2>
|
| 385 |
+
<span class="ml-2 text-blue-500"><i class="fas fa-file-export"></i></span>
|
| 386 |
+
</div>
|
| 387 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 388 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 389 |
+
<button class="btn btn-secondary" onclick="exportReportsCSVZipUI()">
|
| 390 |
+
<i class="fas fa-file-csv mr-2"></i>Exporter Rapport en CSV (ZIP)
|
| 391 |
+
</button>
|
| 392 |
+
<button class="btn btn-secondary" onclick="exportReportsPDFZipUI()">
|
| 393 |
+
<i class="fas fa-file-pdf mr-2"></i>Exporter Rapport en PDF (ZIP)
|
| 394 |
+
</button>
|
| 395 |
+
</div>
|
| 396 |
+
<div id="exportResult" class="mt-4"></div>
|
| 397 |
+
</div>
|
| 398 |
+
</div>
|
| 399 |
+
|
| 400 |
+
<!-- Section Favoris -->
|
| 401 |
+
<div id="section-favorites" class="section">
|
| 402 |
+
<div class="flex items-center mb-6">
|
| 403 |
+
<h2 class="text-2xl font-bold text-gray-800">Favoris</h2>
|
| 404 |
+
<span class="ml-2 text-blue-500"><i class="fas fa-star"></i></span>
|
| 405 |
+
</div>
|
| 406 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 407 |
+
<form id="favoriteForm">
|
| 408 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 409 |
+
<div class="form-group">
|
| 410 |
+
<label for="favName" class="font-medium text-gray-700">Nom du favori :</label>
|
| 411 |
+
<input type="text" class="form-control mt-1" id="favName" required style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 412 |
+
</div>
|
| 413 |
+
<div class="form-group">
|
| 414 |
+
<label for="favDateDebut" class="font-medium text-gray-700">Date début :</label>
|
| 415 |
+
<input type="date" class="form-control mt-1" id="favDateDebut" required style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 416 |
+
</div>
|
| 417 |
+
<div class="form-group">
|
| 418 |
+
<label for="favDateFin" class="font-medium text-gray-700">Date fin :</label>
|
| 419 |
+
<input type="date" class="form-control mt-1" id="favDateFin" required style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 420 |
+
</div>
|
| 421 |
+
<div class="form-group">
|
| 422 |
+
<label for="favFilterText" class="font-medium text-gray-700">Filtrer par Raison :</label>
|
| 423 |
+
<input type="text" class="form-control mt-1" id="favFilterText" placeholder="ex: Paiement facture;Transfère" required style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 424 |
+
</div>
|
| 425 |
+
</div>
|
| 426 |
+
|
| 427 |
+
<div class="form-group mt-4">
|
| 428 |
+
<label class="font-medium text-gray-700">Filtrer par Montant :</label>
|
| 429 |
+
<div class="space-y-3 mt-2">
|
| 430 |
+
<div class="form-check">
|
| 431 |
+
<input class="form-check-input" type="radio" name="favAmountFilterMode" id="favAmountNone" value="none" checked>
|
| 432 |
+
<label class="form-check-label ml-2 text-gray-700" for="favAmountNone">Aucun filtre</label>
|
| 433 |
+
</div>
|
| 434 |
+
<div class="form-check">
|
| 435 |
+
<input class="form-check-input" type="radio" name="favAmountFilterMode" id="favAmountGreater" value="greater">
|
| 436 |
+
<label class="form-check-label ml-2 text-gray-700" for="favAmountGreater">Montant supérieur à</label>
|
| 437 |
+
<input type="number" class="form-control mt-1 ml-4" id="favAmountGreaterVal" placeholder="Valeur" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 438 |
+
</div>
|
| 439 |
+
<div class="form-check">
|
| 440 |
+
<input class="form-check-input" type="radio" name="favAmountFilterMode" id="favAmountLess" value="less">
|
| 441 |
+
<label class="form-check-label ml-2 text-gray-700" for="favAmountLess">Montant inférieur à</label>
|
| 442 |
+
<input type="number" class="form-control mt-1 ml-4" id="favAmountLessVal" placeholder="Valeur" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 443 |
+
</div>
|
| 444 |
+
<div class="form-check">
|
| 445 |
+
<input class="form-check-input" type="radio" name="favAmountFilterMode" id="favAmountBetween" value="between">
|
| 446 |
+
<label class="form-check-label ml-2 text-gray-700" for="favAmountBetween">Montant entre</label>
|
| 447 |
+
<div class="flex items-center mt-1 ml-4">
|
| 448 |
+
<input type="number" class="form-control mr-2" id="favAmountMin" placeholder="Min" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 449 |
+
<span class="text-gray-500 mx-1">et</span>
|
| 450 |
+
<input type="number" class="form-control ml-2" id="favAmountMax" placeholder="Max" style="border-radius: 6px; border: 1px solid #e2e8f0;">
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
</div>
|
| 454 |
+
</div>
|
| 455 |
+
|
| 456 |
+
<button type="button" class="btn btn-primary mt-4" onclick="saveFavorite()">
|
| 457 |
+
<i class="fas fa-save mr-2"></i>Enregistrer Favori
|
| 458 |
+
</button>
|
| 459 |
+
</form>
|
| 460 |
+
|
| 461 |
+
<hr class="my-6 border-gray-200">
|
| 462 |
+
|
| 463 |
+
<div class="flex items-center justify-between mb-4">
|
| 464 |
+
<h4 class="font-bold text-lg text-gray-800">Liste des Favoris</h4>
|
| 465 |
+
<button class="btn btn-secondary" onclick="loadFavorites()">
|
| 466 |
+
<i class="fas fa-sync-alt mr-2"></i>Charger Favoris
|
| 467 |
+
</button>
|
| 468 |
+
</div>
|
| 469 |
+
<div id="favoritesList" class="overflow-x-auto"></div>
|
| 470 |
+
</div>
|
| 471 |
+
</div>
|
| 472 |
+
|
| 473 |
+
<!-- Section Logs -->
|
| 474 |
+
<div id="section-logs" class="section">
|
| 475 |
+
<div class="flex items-center mb-6">
|
| 476 |
+
<h2 class="text-2xl font-bold text-gray-800">Logs</h2>
|
| 477 |
+
<span class="ml-2 text-blue-500"><i class="fas fa-clipboard-list"></i></span>
|
| 478 |
+
</div>
|
| 479 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 480 |
+
<div class="flex items-center justify-between mb-4">
|
| 481 |
+
<h4 class="font-bold text-lg text-gray-800">Historique des activités</h4>
|
| 482 |
+
<button class="btn btn-secondary" onclick="loadLogs()">
|
| 483 |
+
<i class="fas fa-sync-alt mr-2"></i>Charger Logs
|
| 484 |
+
</button>
|
| 485 |
+
</div>
|
| 486 |
+
<div id="logsList" class="overflow-x-auto"></div>
|
| 487 |
+
</div>
|
| 488 |
+
</div>
|
| 489 |
+
</main>
|
| 490 |
+
</div>
|
| 491 |
+
</div>
|
| 492 |
+
|
| 493 |
+
<!-- Bootstrap JS et dépendances -->
|
| 494 |
+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
| 495 |
+
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
|
| 496 |
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
| 497 |
+
|
| 498 |
+
<!-- DataTables JS -->
|
| 499 |
+
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.js"></script>
|
| 500 |
+
|
| 501 |
+
<script>
|
| 502 |
+
// Affichage des notifications
|
| 503 |
+
function showNotification(elementId, message, type) {
|
| 504 |
+
var alertClass = {
|
| 505 |
+
'success': 'bg-green-100 border-green-400 text-green-700',
|
| 506 |
+
'danger': 'bg-red-100 border-red-400 text-red-700',
|
| 507 |
+
'info': 'bg-blue-100 border-blue-400 text-blue-700',
|
| 508 |
+
'warning': 'bg-yellow-100 border-yellow-400 text-yellow-700'
|
| 509 |
+
};
|
| 510 |
+
|
| 511 |
+
var notification = document.createElement('div');
|
| 512 |
+
notification.className = `border-l-4 p-4 mb-4 rounded ${alertClass[type]}`;
|
| 513 |
+
notification.innerHTML = `
|
| 514 |
+
<div class="flex items-center">
|
| 515 |
+
<div class="flex-shrink-0">
|
| 516 |
+
${type === 'success' ? '<i class="fas fa-check-circle text-green-500"></i>' :
|
| 517 |
+
type === 'danger' ? '<i class="fas fa-exclamation-circle text-red-500"></i>' :
|
| 518 |
+
type === 'info' ? '<i class="fas fa-info-circle text-blue-500"></i>' :
|
| 519 |
+
'<i class="fas fa-exclamation-triangle text-yellow-500"></i>'}
|
| 520 |
+
</div>
|
| 521 |
+
<div class="ml-3">
|
| 522 |
+
<p class="text-sm">${message}</p>
|
| 523 |
+
</div>
|
| 524 |
+
<div class="ml-auto pl-3">
|
| 525 |
+
<button type="button" class="text-gray-500 hover:text-gray-700" onclick="this.parentElement.parentElement.remove()">
|
| 526 |
+
<i class="fas fa-times"></i>
|
| 527 |
+
</button>
|
| 528 |
+
</div>
|
| 529 |
+
</div>
|
| 530 |
+
`;
|
| 531 |
+
|
| 532 |
+
document.getElementById(elementId).appendChild(notification);
|
| 533 |
+
}
|
| 534 |
+
|
| 535 |
+
// Afficher une section et masquer les autres
|
| 536 |
+
function showSection(section) {
|
| 537 |
+
var sections = document.querySelectorAll('.section');
|
| 538 |
+
sections.forEach(function(sec) { sec.style.display = 'none'; });
|
| 539 |
+
document.getElementById('section-' + section).style.display = 'block';
|
| 540 |
+
|
| 541 |
+
// Update active state in sidebar
|
| 542 |
+
document.querySelectorAll('#sidebar .nav-link').forEach(function(link) {
|
| 543 |
+
link.classList.remove('active');
|
| 544 |
+
});
|
| 545 |
+
document.querySelector(`#sidebar .nav-link[onclick="showSection('${section}')"]`).classList.add('active');
|
| 546 |
+
}
|
| 547 |
+
showSection('home');
|
| 548 |
+
|
| 549 |
+
// Import CSV
|
| 550 |
+
function importCSV() {
|
| 551 |
+
var csvText = document.getElementById('csvInput').value;
|
| 552 |
+
google.script.run.withSuccessHandler(function(response) {
|
| 553 |
+
showNotification('importResult', response, "success");
|
| 554 |
+
}).withFailureHandler(function(error) {
|
| 555 |
+
showNotification('importResult', "Erreur : " + error.message, "danger");
|
| 556 |
+
}).importCSVData(csvText);
|
| 557 |
+
}
|
| 558 |
+
|
| 559 |
+
// Générer le rapport complet
|
| 560 |
+
function generateReport() {
|
| 561 |
+
var criteria = {
|
| 562 |
+
dateDebut: document.getElementById('dateDebut').value,
|
| 563 |
+
dateFin: document.getElementById('dateFin').value,
|
| 564 |
+
filterText: document.getElementById('filterText').value,
|
| 565 |
+
filterIndicator: document.getElementById('filterIndicator').value,
|
| 566 |
+
amountFilterMode: document.querySelector('input[name="amountFilterMode"]:checked').value,
|
| 567 |
+
amountGreater: document.getElementById('amountGreater').value,
|
| 568 |
+
amountLess: document.getElementById('amountLess').value,
|
| 569 |
+
amountMin: document.getElementById('amountMin').value,
|
| 570 |
+
amountMax: document.getElementById('amountMax').value
|
| 571 |
+
};
|
| 572 |
+
google.script.run.withSuccessHandler(function(response) {
|
| 573 |
+
showNotification('reportResult', response, "success");
|
| 574 |
+
}).withFailureHandler(function(error) {
|
| 575 |
+
showNotification('reportResult', "Erreur : " + error.message, "danger");
|
| 576 |
+
}).filterAndGenerateReport(criteria);
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
// Réinitialiser les rapports
|
| 580 |
+
function resetReportsUI() {
|
| 581 |
+
google.script.run.withSuccessHandler(function(response) {
|
| 582 |
+
showNotification('reportResult', response, "info");
|
| 583 |
+
}).withFailureHandler(function(error) {
|
| 584 |
+
showNotification('reportResult', "Erreur lors de la remise à zéro : " + error.message, "danger");
|
| 585 |
+
}).resetReports();
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
// Export CSV ZIP
|
| 589 |
+
function exportReportsCSVZipUI() {
|
| 590 |
+
google.script.run.withSuccessHandler(function(base64Zip) {
|
| 591 |
+
var link = document.createElement("a");
|
| 592 |
+
link.href = "data:application/zip;base64," + base64Zip;
|
| 593 |
+
link.download = "Rapports_CSV.zip";
|
| 594 |
+
link.click();
|
| 595 |
+
showNotification('exportResult', "Export CSV (ZIP) réussi.", "success");
|
| 596 |
+
}).withFailureHandler(function(error) {
|
| 597 |
+
showNotification('exportResult', "Erreur lors de l'export CSV (ZIP) : " + error.message, "danger");
|
| 598 |
+
}).exportReportsCSVAsBase64();
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
// Export PDF ZIP
|
| 602 |
+
function exportReportsPDFZipUI() {
|
| 603 |
+
google.script.run.withSuccessHandler(function(base64Zip) {
|
| 604 |
+
var link = document.createElement("a");
|
| 605 |
+
link.href = "data:application/zip;base64," + base64Zip;
|
| 606 |
+
link.download = "Rapports_PDF.zip";
|
| 607 |
+
link.click();
|
| 608 |
+
showNotification('exportResult', "Export PDF (ZIP) réussi.", "success");
|
| 609 |
+
}).withFailureHandler(function(error) {
|
| 610 |
+
showNotification('exportResult', "Erreur lors de l'export PDF (ZIP) : " + error.message, "danger");
|
| 611 |
+
}).exportReportsPDFZipAsBase64();
|
| 612 |
+
}
|
| 613 |
+
|
| 614 |
+
// Favoris
|
| 615 |
+
function saveFavorite() {
|
| 616 |
+
var fav = {
|
| 617 |
+
name: document.getElementById('favName').value,
|
| 618 |
+
dateDebut: document.getElementById('favDateDebut').value,
|
| 619 |
+
dateFin: document.getElementById('favDateFin').value,
|
| 620 |
+
filterText: document.getElementById('favFilterText').value,
|
| 621 |
+
amountFilterMode: document.querySelector('input[name="favAmountFilterMode"]:checked').value,
|
| 622 |
+
amountGreater: document.getElementById('favAmountGreaterVal').value,
|
| 623 |
+
amountLess: document.getElementById('favAmountLessVal').value,
|
| 624 |
+
amountMin: document.getElementById('favAmountMin').value,
|
| 625 |
+
amountMax: document.getElementById('favAmountMax').value
|
| 626 |
+
};
|
| 627 |
+
google.script.run.withSuccessHandler(function(response) {
|
| 628 |
+
showNotification('favoritesList', response, "success");
|
| 629 |
+
loadFavorites();
|
| 630 |
+
}).withFailureHandler(function(error) {
|
| 631 |
+
showNotification('favoritesList', "Erreur : " + error.message, "danger");
|
| 632 |
+
}).saveFavorite(fav);
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
+
function loadFavorites() {
|
| 636 |
+
google.script.run.withSuccessHandler(function(data) {
|
| 637 |
+
if (!data || data.length <= 1) {
|
| 638 |
+
document.getElementById('favoritesList').innerHTML = '<p class="text-gray-500">Aucun favori enregistré.</p>';
|
| 639 |
+
return;
|
| 640 |
+
}
|
| 641 |
+
|
| 642 |
+
var html = '<table class="enhanced-table"><thead><tr><th>Date</th><th>Nom</th><th>Date Début</th><th>Date Fin</th><th>Filtre Raison</th><th>Mode Montant</th><th>Valeur(s)</th></tr></thead><tbody>';
|
| 643 |
+
|
| 644 |
+
for (var i = 1; i < data.length; i++) {
|
| 645 |
+
html += '<tr>';
|
| 646 |
+
for (var j = 0; j < data[i].length; j++) {
|
| 647 |
+
html += '<td>' + (data[i][j] || '') + '</td>';
|
| 648 |
+
}
|
| 649 |
+
html += '</tr>';
|
| 650 |
+
}
|
| 651 |
+
|
| 652 |
+
html += '</tbody></table>';
|
| 653 |
+
document.getElementById('favoritesList').innerHTML = html;
|
| 654 |
+
|
| 655 |
+
// Initialize DataTable
|
| 656 |
+
$('#favoritesList table').DataTable({
|
| 657 |
+
"pageLength": 10,
|
| 658 |
+
"ordering": true,
|
| 659 |
+
"searching": true,
|
| 660 |
+
"language": { "url": "//cdn.datatables.net/plug-ins/1.10.21/i18n/French.json" }
|
| 661 |
+
});
|
| 662 |
+
}).getFavorites();
|
| 663 |
+
}
|
| 664 |
+
|
| 665 |
+
function loadLogs() {
|
| 666 |
+
google.script.run.withSuccessHandler(function(data) {
|
| 667 |
+
if (!data || data.length <= 1) {
|
| 668 |
+
document.getElementById('logsList').innerHTML = '<p class="text-gray-500">Aucun log disponible.</p>';
|
| 669 |
+
return;
|
| 670 |
+
}
|
| 671 |
+
|
| 672 |
+
var html = '<table class="enhanced-table"><thead><tr><th>Date</th><th>Action</th><th>Détails</th></tr></thead><tbody>';
|
| 673 |
+
|
| 674 |
+
for (var i = 1; i < data.length; i++) {
|
| 675 |
+
html += '<tr>';
|
| 676 |
+
for (var j = 0; j < data[i].length; j++) {
|
| 677 |
+
html += '<td>' + (data[i][j] || '') + '</td>';
|
| 678 |
+
}
|
| 679 |
+
html += '</tr>';
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
html += '</tbody></table>';
|
| 683 |
+
document.getElementById('logsList').innerHTML = html;
|
| 684 |
+
|
| 685 |
+
// Initialize DataTable
|
| 686 |
+
$('#logsList table').DataTable({
|
| 687 |
+
"pageLength": 10,
|
| 688 |
+
"ordering": true,
|
| 689 |
+
"searching": true,
|
| 690 |
+
"language": { "url": "//cdn.datatables.net/plug-ins/1.10.21/i18n/French.json" }
|
| 691 |
+
});
|
| 692 |
+
}).getLogs();
|
| 693 |
+
}
|
| 694 |
+
|
| 695 |
+
// Fonctions pour la section Lecture avec DataTables pour "Rapport"
|
| 696 |
+
var reportDataCache = [];
|
| 697 |
+
function loadReportData() {
|
| 698 |
+
google.script.run.withSuccessHandler(function(data) {
|
| 699 |
+
reportDataCache = data;
|
| 700 |
+
var html = generateEnhancedTableHTML(reportDataCache);
|
| 701 |
+
document.getElementById('reportDataDiv').innerHTML = html;
|
| 702 |
+
$('#reportDataDiv table').DataTable({
|
| 703 |
+
"pageLength": 100,
|
| 704 |
+
"ordering": true,
|
| 705 |
+
"searching": true,
|
| 706 |
+
"language": { "url": "//cdn.datatables.net/plug-ins/1.10.21/i18n/French.json" }
|
| 707 |
+
});
|
| 708 |
+
}).getReportData();
|
| 709 |
+
}
|
| 710 |
+
|
| 711 |
+
function loadGroupData() {
|
| 712 |
+
google.script.run.withSuccessHandler(function(data) {
|
| 713 |
+
var html = generateEnhancedTableHTML(data);
|
| 714 |
+
document.getElementById('groupDataDiv').innerHTML = html;
|
| 715 |
+
$('#groupDataDiv table').DataTable({
|
| 716 |
+
"pageLength": 100,
|
| 717 |
+
"ordering": true,
|
| 718 |
+
"searching": true,
|
| 719 |
+
"language": { "url": "//cdn.datatables.net/plug-ins/1.10.21/i18n/French.json" }
|
| 720 |
+
});
|
| 721 |
+
}).getGroupData();
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
+
function loadIndicatorData() {
|
| 725 |
+
google.script.run.withSuccessHandler(function(data) {
|
| 726 |
+
var html = generateEnhancedTableHTML(data);
|
| 727 |
+
document.getElementById('indicatorDataDiv').innerHTML = html;
|
| 728 |
+
$('#indicatorDataDiv table').DataTable({
|
| 729 |
+
"pageLength": 100,
|
| 730 |
+
"ordering": true,
|
| 731 |
+
"searching": true,
|
| 732 |
+
"language": { "url": "//cdn.datatables.net/plug-ins/1.10.21/i18n/French.json" }
|
| 733 |
+
});
|
| 734 |
+
}).getIndicatorData();
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
function generateEnhancedTableHTML(data) {
|
| 738 |
+
if (!data || data.length === 0) return "<div class='bg-gray-50 p-4 rounded-lg border border-gray-200 text-center text-gray-500'>Aucune donnée disponible.</div>";
|
| 739 |
+
|
| 740 |
+
var html = "<table class='enhanced-table'><thead><tr>";
|
| 741 |
+
|
| 742 |
+
// Headers
|
| 743 |
+
data[0].forEach(function(header) {
|
| 744 |
+
html += "<th class='text-left'>" + header + "</th>";
|
| 745 |
+
});
|
| 746 |
+
|
| 747 |
+
html += "</tr></thead><tbody>";
|
| 748 |
+
|
| 749 |
+
// Rows
|
| 750 |
+
for (var i = 1; i < data.length; i++) {
|
| 751 |
+
html += "<tr>";
|
| 752 |
+
data[i].forEach(function(cell) {
|
| 753 |
+
// Highlight potential numeric values (amounts)
|
| 754 |
+
if (!isNaN(parseFloat(cell)) && cell.toString().indexOf('.') !== -1) {
|
| 755 |
+
html += "<td class='text-right font-medium'>" + parseFloat(cell).toFixed(2) + "</td>";
|
| 756 |
+
} else {
|
| 757 |
+
html += "<td>" + (cell || '') + "</td>";
|
| 758 |
+
}
|
| 759 |
+
});
|
| 760 |
+
html += "</tr>";
|
| 761 |
+
}
|
| 762 |
+
|
| 763 |
+
html += "</tbody></table>";
|
| 764 |
+
return html;
|
| 765 |
+
}
|
| 766 |
+
|
| 767 |
+
// Fonction pour charger les graphiques dans la section Graphiques
|
| 768 |
+
function loadGraphs() {
|
| 769 |
+
google.script.run.withSuccessHandler(function(html) {
|
| 770 |
+
document.getElementById('graphsDiv').innerHTML = html;
|
| 771 |
+
}).withFailureHandler(function(error) {
|
| 772 |
+
showNotification('exportResult', "Erreur lors du chargement des graphiques : " + error.message, "danger");
|
| 773 |
+
}).getGraphsHTML();
|
| 774 |
+
}
|
| 775 |
+
</script>
|
| 776 |
+
<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=gtkh/test5" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 777 |
+
</html>
|