Spaces:
Running
Running
File size: 19,911 Bytes
e71f0e3 ab2024a e71f0e3 ab2024a e71f0e3 |
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 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Response Countries Readiness</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.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;
}
.table-container {
overflow-x: auto;
}
.sticky-col {
position: sticky;
left: 0;
background-color: white;
z-index: 10;
}
.sticky-header {
position: sticky;
top: 0;
z-index: 20;
}
.progress-bar {
height: 6px;
border-radius: 3px;
overflow: hidden;
background-color: #e5e7eb;
}
.progress-fill {
height: 100%;
border-radius: 3px;
transition: width 0.5s ease-in-out;
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltip-text {
visibility: hidden;
width: 120px;
background-color: #1f2937;
color: white;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
font-size: 12px;
}
.tooltip:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
@media print {
.no-print {
display: none;
}
.page-break {
page-break-after: always;
}
}
</style>
</head>
<body class="bg-gray-50 text-gray-800">
<div class="min-h-screen py-8 px-4 sm:px-6 lg:px-8">
<div class="max-w-7xl mx-auto">
<!-- Header -->
<div class="text-center mb-8">
<h1 class="text-3xl font-bold text-gray-900 mb-2">Response Countries Readiness</h1>
<p class="text-lg text-gray-600">Regional/HQ support</p>
</div>
<!-- Filters -->
<div class="bg-white rounded-xl shadow-lg p-6 mb-6">
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<!-- Hazard Type Filter -->
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Hazard Type</label>
<select id="hazard-filter" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<option value="all">All Hazards</option>
<option value="epidemic">Epidemic</option>
<option value="earthquake">Earthquake</option>
<option value="flood">Flood</option>
<option value="cyclone">Cyclone</option>
<option value="drought">Drought</option>
<option value="conflict">Conflict</option>
</select>
</div>
<!-- Country Filter -->
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Country</label>
<select id="country-filter" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<option value="all">All Countries</option>
<option value="drc">DRC</option>
<option value="tanzania">Tanzania</option>
<option value="southSudan">South Sudan</option>
<option value="burundi">Burundi</option>
<option value="angola">Angola</option>
<option value="car">CAR</option>
<option value="uganda">Uganda</option>
<option value="zambia">Zambia</option>
<option value="afro">AFRO</option>
<option value="hq">HQ</option>
</select>
</div>
<!-- 5Cs Filter -->
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">5Cs</label>
<select id="fivecs-filter" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<option value="all">All 5Cs</option>
<option value="coordination">Coordination</option>
<option value="continuity">Continuity</option>
<option value="communication">Communication</option>
<option value="contingency">Contingency</option>
<option value="capacity">Capacity</option>
</select>
</div>
<!-- Support Type Filter -->
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Support Type</label>
<select id="support-filter" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<option value="all">All Support</option>
<option value="readiness">Readiness Country</option>
<option value="response">Response Country</option>
<option value="regional">Regional/HQ Support</option>
</select>
</div>
</div>
</div>
<!-- Controls -->
<div class="flex flex-wrap gap-4 justify-between items-center mb-6 no-print">
<div class="flex items-center space-x-4">
<div class="tooltip">
<button id="export-pdf" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center transition-colors">
<i data-feather="download" class="w-4 h-4 mr-2"></i>
Export PDF
</button>
<span class="tooltip-text">Export table as PDF</span>
</div>
<div class="tooltip">
<button id="print" class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-lg flex items-center transition-colors">
<i data-feather="printer" class="w-4 h-4 mr-2"></i>
Print
</button>
<span class="tooltip-text">Print table</span>
</div>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" id="search" placeholder="Search..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"></i>
</div>
<div class="tooltip">
<button id="toggle-view" class="bg-purple-500 hover:bg-purple-600 text-white px-4 py-2 rounded-lg flex items-center transition-colors">
<i data-feather="grid" class="w-4 h-4 mr-2"></i>
Card View
</button>
<span class="tooltip-text">Toggle between table and card view</span>
</div>
</div>
</div>
<!-- Table Container -->
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<div class="table-container max-h-screen overflow-auto">
<table class="min-w-full divide-y divide-gray-200" id="readiness-table">
<thead class="bg-gray-50 sticky-header">
<tr>
<th class="sticky-col px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50 border-r">5Cs</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Pillars</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">DRC</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tanzania</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">South Sudan</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Burundi</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Angola</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">CAR</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Uganda</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Zambia</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">AFRO</th>
<th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">HQ</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200" id="table-body">
<!-- Data will be populated by JavaScript -->
</tbody>
</table>
</div>
</div>
<!-- Pagination -->
<div class="flex justify-between items-center mt-6 no-print">
<div class="text-sm text-gray-600">
Showing <span id="page-start">1</span> to <span id="page-end">10</span> of <span id="total-items">0</span> entries
</div>
<div class="flex space-x-2">
<button id="prev-page" class="px-3 py-2 border border-gray-300 rounded-lg text-gray-600 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
<i data-feather="chevron-left" class="w-4 h-4"></i>
</button>
<div id="page-numbers" class="flex space-x-1"></div>
<button id="next-page" class="px-3 py-2 border border-gray-300 rounded-lg text-gray-600 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
<i data-feather="chevron-right" class="w-4 h-4"></i>
</button>
</div>
</div>
</div>
</div>
<script>
|