File size: 21,645 Bytes
0cf5ea8 3f7beee 0cf5ea8 0a38eae 0cf5ea8 0a38eae 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 3f7beee 0cf5ea8 |
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 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reports | Safety Sentinel</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
}
.report-card:hover {
transform: translateY(-3px);
transition: all 0.2s ease;
}
</style>
</head>
<body class="bg-gray-50">
<div id="vanta-bg" class="fixed inset-0 -z-10"></div>
<!-- Navigation -->
<nav class="bg-white bg-opacity-90 backdrop-blur-md border-b border-gray-200 fixed w-full z-10">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="shield" class="h-8 w-8 text-blue-600"></i>
<span class="ml-2 text-xl font-bold text-gray-900">Safety Sentinel</span>
</div>
</div>
<div class="hidden md:ml-6 md:flex md:items-center md:space-x-8">
<a href="index.html" class="text-gray-500 hover:text-gray-700 px-1 pt-1 text-sm font-medium">Dashboard</a>
<a href="incidents.html" class="text-gray-500 hover:text-gray-700 px-1 pt-1 text-sm font-medium">Incidents</a>
<a href="compliance.html" class="text-gray-500 hover:text-gray-700 px-1 pt-1 text-sm font-medium">Compliance</a>
<a href="reports.html" class="text-blue-600 border-b-2 border-blue-600 px-1 pt-1 text-sm font-medium">Reports</a>
<a href="training.html" class="text-gray-500 hover:text-gray-700 px-1 pt-1 text-sm font-medium">Training</a>
</div>
<div class="flex items-center">
<div class="ml-4 relative flex-shrink-0">
<div>
<button type="button" class="bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" id="user-menu">
<span class="sr-only">Open user menu</span>
<img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/42" alt="">
</button>
</div>
</div>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="pt-24 pb-12 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<!-- Header -->
<div class="flex flex-col md:flex-row md:items-center md:justify-between mb-8">
<div>
<h1 class="text-3xl font-bold text-gray-900">Safety Reports</h1>
<p class="mt-2 text-sm text-gray-600">View and analyze all safety reports and statistics</p>
</div>
<div class="mt-4 md:mt-0">
<a href="report-generator.html" class="bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
<i data-feather="file-text" class="h-4 w-4 inline mr-1"></i> Generate New Report
</a>
</div>
</div>
<!-- Filters -->
<div class="bg-white p-4 rounded-lg shadow mb-8">
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Report Type</label>
<select class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
<option>All Types</option>
<option>Incident Reports</option>
<option>Near Misses</option>
<option>Hazard Identifications</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Severity</label>
<select class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
<option>All Levels</option>
<option>Low</option>
<option>Medium</option>
<option>High</option>
<option>Critical</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Date Range</label>
<select class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
<option>Last 30 Days</option>
<option>Last 90 Days</option>
<option>This Year</option>
<option>All Time</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Department</label>
<select class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
<option>All Departments</option>
<option>Processing</option>
<option>Maintenance</option>
<option>Logistics</option>
<option>Storage</option>
</select>
</div>
</div>
</div>
<!-- Reports Summary -->
<div class="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4 mb-8">
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-blue-500 rounded-md p-3">
<i data-feather="file-text" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Total Reports</dt>
<dd>
<div class="text-lg font-medium text-gray-900">127</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-red-500 rounded-md p-3">
<i data-feather="alert-triangle" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Open Incidents</dt>
<dd>
<div class="text-lg font-medium text-gray-900">14</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-green-500 rounded-md p-3">
<i data-feather="check-circle" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Resolved</dt>
<dd>
<div class="text-lg font-medium text-gray-900">89%</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="bg-white overflow-hidden shadow rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
<div class="flex-shrink-0 bg-yellow-500 rounded-md p-3">
<i data-feather="clock" class="h-6 w-6 text-white"></i>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Avg Resolution</dt>
<dd>
<div class="text-lg font-medium text-gray-900">3.2 days</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<!-- Report Trends Chart -->
<div class="bg-white p-6 rounded-lg shadow mb-8">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-medium text-gray-900">Report Trends</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 bg-blue-100 text-blue-700 rounded-md text-sm font-medium">Monthly</button>
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium">Quarterly</button>
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium">Yearly</button>
</div>
</div>
<div class="h-80">
<canvas id="trendsChart"></canvas>
</div>
</div>
<!-- Reports List -->
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-medium text-gray-900">Recent Reports</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium">
<i data-feather="download" class="h-4 w-4 inline mr-1"></i> Export
</button>
</div>
</div>
<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">Report ID</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Location</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Severity</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th scope="col" class="relative px-6 py-3">
<span class="sr-only">Actions</span>
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#SR-2023-042</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Incident</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 15, 2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">North Processing</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">High</span>
</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">Investigation</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">View</a>
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#SR-2023-041</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Near Miss</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 14, 2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Loading Dock</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">Medium</span>
</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">Resolved</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">View</a>
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#SR-2023-040</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Hazard</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 12, 2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Compression Station</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-orange-100 text-orange-800">High</span>
</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">Resolved</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">View</a>
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#SR-2023-039</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Suggestion</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 10, 2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Facility-wide</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">N/A</span>
</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">Review</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-blue-600 hover:text-blue-900">View</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="mt-4 flex items-center justify-between">
<div class="text-sm text-gray-500">
Showing <span class="font-medium">1</span> to <span class="font-medium">4</span> of <span class="font-medium">127</span> results
</div>
<div class="flex space-x-2">
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium">
Previous
</button>
<button class="px-3 py-1 bg-blue-600 text-white rounded-md text-sm font-medium">
1
</button>
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium">
2
</button>
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium">
Next
</button>
</div>
</div>
</div>
</div>
<script>
// Vanta.js Background
VANTA.WAVES({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
color: 0x172b4d,
waveHeight: 15.00,
waveSpeed: 0.75,
zoom: 0.8
});
// Chart.js Implementation
document.addEventListener('DOMContentLoaded', function() {
feather.replace();
const ctx = document.getElementById('trendsChart').getContext('2d');
const trendsChart = new Chart(ctx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [
{
label: 'Incident Reports',
data: [12, 8, 15, 10, 14, 9],
borderColor: 'rgba(239, 68, 68, 1)',
backgroundColor: 'rgba(239, 68, 68, 0.1)',
borderWidth: 2,
tension: 0.3,
fill: true
},
{
label: 'Near Misses',
data: [8, 10, 12, 7, 9, 6],
borderColor: 'rgba(234, 179, 8, 1)',
backgroundColor: 'rgba(234, 179, 8, 0.1)',
borderWidth: 2,
tension: 0.3,
fill: true
},
{
label: 'Hazard IDs',
data: [5, 7, 4, 6, 8, 5],
borderColor: 'rgba(59, 130, 246, 1)',
backgroundColor: 'rgba(59, 130, 246, 0.1)',
borderWidth: 2,
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
},
tooltip: {
mode: 'index',
intersect: false,
}
},
scales: {
y: {
beginAtZero: true,
ticks: {
stepSize: 5
}
}
}
}
});
});
</script>
</body>
</html> |