Add 2 files
Browse files- index.html +238 -12
- prompts.txt +2 -1
index.html
CHANGED
|
@@ -124,10 +124,10 @@
|
|
| 124 |
</header>
|
| 125 |
|
| 126 |
<div class="container mx-auto px-4 py-6">
|
| 127 |
-
<!-- Filter Section -->
|
| 128 |
<div class="bg-card rounded-xl shadow-md p-6 mb-6">
|
| 129 |
-
<div class="grid grid-cols-1 md:grid-cols-
|
| 130 |
-
<div>
|
| 131 |
<label class="block text-sm font-medium mb-1">Date Range</label>
|
| 132 |
<div class="relative">
|
| 133 |
<select class="w-full bg-gray-100 border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-secondary">
|
|
@@ -139,7 +139,7 @@
|
|
| 139 |
</select>
|
| 140 |
</div>
|
| 141 |
</div>
|
| 142 |
-
<div>
|
| 143 |
<label class="block text-sm font-medium mb-1">Shipment Status</label>
|
| 144 |
<div class="relative">
|
| 145 |
<select class="w-full bg-gray-100 border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-secondary">
|
|
@@ -151,7 +151,7 @@
|
|
| 151 |
</select>
|
| 152 |
</div>
|
| 153 |
</div>
|
| 154 |
-
<div>
|
| 155 |
<label class="block text-sm font-medium mb-1">Port of Entry</label>
|
| 156 |
<div class="relative">
|
| 157 |
<select class="w-full bg-gray-100 border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-secondary">
|
|
@@ -164,7 +164,38 @@
|
|
| 164 |
</select>
|
| 165 |
</div>
|
| 166 |
</div>
|
| 167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
<button class="bg-primary hover:bg-blue-900 text-white py-2 px-4 rounded-lg w-full flex items-center justify-center">
|
| 169 |
<i class="fas fa-filter mr-2"></i> Apply Filters
|
| 170 |
</button>
|
|
@@ -294,6 +325,32 @@
|
|
| 294 |
<canvas id="portsChart"></canvas>
|
| 295 |
</div>
|
| 296 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 297 |
</div>
|
| 298 |
|
| 299 |
<!-- Detailed Shipments Table -->
|
|
@@ -338,6 +395,12 @@
|
|
| 338 |
<i class="fas fa-sort ml-1 text-gray-400"></i>
|
| 339 |
</div>
|
| 340 |
</th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 341 |
<th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100">
|
| 342 |
<div class="flex items-center">
|
| 343 |
<span>Status</span>
|
|
@@ -421,7 +484,7 @@
|
|
| 421 |
</footer>
|
| 422 |
|
| 423 |
<script>
|
| 424 |
-
//
|
| 425 |
const shipmentData = {
|
| 426 |
weeks: ['Week 1', 'Week 2', 'Week 3', 'Week 4', 'Week 5'],
|
| 427 |
shipments: [240, 290, 320, 285, 310],
|
|
@@ -433,6 +496,14 @@
|
|
| 433 |
labels: ['Completed', 'In Progress', 'Delayed', 'Pending'],
|
| 434 |
data: [668, 457, 123, 100],
|
| 435 |
colors: ['#22c55e', '#3b82f6', '#f97316', '#a855f7']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 436 |
}
|
| 437 |
};
|
| 438 |
|
|
@@ -451,7 +522,8 @@
|
|
| 451 |
borderColor: '#3b82f6',
|
| 452 |
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
| 453 |
tension: 0.3,
|
| 454 |
-
fill: true
|
|
|
|
| 455 |
},
|
| 456 |
{
|
| 457 |
label: 'Completed Shipments',
|
|
@@ -459,7 +531,8 @@
|
|
| 459 |
borderColor: '#22c55e',
|
| 460 |
backgroundColor: 'rgba(34, 197, 94, 0.1)',
|
| 461 |
tension: 0.3,
|
| 462 |
-
fill: true
|
|
|
|
| 463 |
},
|
| 464 |
{
|
| 465 |
label: 'Delayed Shipments',
|
|
@@ -467,7 +540,8 @@
|
|
| 467 |
borderColor: '#f97316',
|
| 468 |
backgroundColor: 'rgba(249, 115, 22, 0.1)',
|
| 469 |
tension: 0.3,
|
| 470 |
-
fill: true
|
|
|
|
| 471 |
}
|
| 472 |
]
|
| 473 |
},
|
|
@@ -479,6 +553,10 @@
|
|
| 479 |
beginAtZero: true,
|
| 480 |
grid: {
|
| 481 |
color: 'rgba(0, 0, 0, 0.05)'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 482 |
}
|
| 483 |
},
|
| 484 |
x: {
|
|
@@ -505,6 +583,13 @@
|
|
| 505 |
return `${context.dataset.label}: ${context.raw} shipments`;
|
| 506 |
}
|
| 507 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 508 |
}
|
| 509 |
}
|
| 510 |
}
|
|
@@ -541,7 +626,7 @@
|
|
| 541 |
if (data.labels.length && data.datasets.length) {
|
| 542 |
return data.labels.map(function(label, i) {
|
| 543 |
const value = data.datasets[0].data[i];
|
| 544 |
-
const percentage = ((value / shipmentData.
|
| 545 |
return {
|
| 546 |
text: `${label}: ${value} (${percentage}%)`,
|
| 547 |
fillStyle: data.datasets[0].backgroundColor[i],
|
|
@@ -566,6 +651,13 @@
|
|
| 566 |
return `${label}: ${value} shipments (${percentage}%)`;
|
| 567 |
}
|
| 568 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 569 |
}
|
| 570 |
}
|
| 571 |
}
|
|
@@ -609,6 +701,10 @@
|
|
| 609 |
x: {
|
| 610 |
grid: {
|
| 611 |
color: 'rgba(0, 0, 0, 0.05)'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 612 |
}
|
| 613 |
},
|
| 614 |
y: {
|
|
@@ -627,6 +723,119 @@
|
|
| 627 |
return `${context.parsed.x} shipments`;
|
| 628 |
}
|
| 629 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 630 |
}
|
| 631 |
}
|
| 632 |
}
|
|
@@ -639,10 +848,11 @@
|
|
| 639 |
const origins = ['China', 'Germany', 'Japan', 'Mexico', 'Canada'];
|
| 640 |
const destinations = ['US East', 'US West', 'US Midwest', 'US South'];
|
| 641 |
|
| 642 |
-
// Generate 25 rows of synthetic shipment data
|
| 643 |
for (let i = 1; i <= 25; i++) {
|
| 644 |
const port = ports[Math.floor(Math.random() * ports.length)];
|
| 645 |
const status = statuses[Math.floor(Math.random() * statuses.length)];
|
|
|
|
| 646 |
const days = Math.floor(Math.random() * 30) + 1;
|
| 647 |
const arrivalDate = new Date();
|
| 648 |
arrivalDate.setDate(arrivalDate.getDate() + days);
|
|
@@ -659,6 +869,12 @@
|
|
| 659 |
${port}
|
| 660 |
</div>
|
| 661 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 662 |
<td class="px-6 py-4 whitespace-nowrap text-sm">
|
| 663 |
<span class="status-pill" data-status="${status}">
|
| 664 |
<i class="fas fa-${status === 'Completed' ? 'check-circle' : status === 'Delayed' ? 'exclamation-triangle' : status === 'Pending' ? 'hourglass-half' : 'sync-alt'} mr-1"></i>
|
|
@@ -707,6 +923,16 @@
|
|
| 707 |
}, 300);
|
| 708 |
});
|
| 709 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 710 |
});
|
| 711 |
</script>
|
| 712 |
<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=anonymous111110987654321/customs-brokerage-analytics-dashboard" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
|
|
|
| 124 |
</header>
|
| 125 |
|
| 126 |
<div class="container mx-auto px-4 py-6">
|
| 127 |
+
<!-- Enhanced Filter Section -->
|
| 128 |
<div class="bg-card rounded-xl shadow-md p-6 mb-6">
|
| 129 |
+
<div class="grid grid-cols-1 md:grid-cols-6 gap-4">
|
| 130 |
+
<div class="md:col-span-1">
|
| 131 |
<label class="block text-sm font-medium mb-1">Date Range</label>
|
| 132 |
<div class="relative">
|
| 133 |
<select class="w-full bg-gray-100 border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-secondary">
|
|
|
|
| 139 |
</select>
|
| 140 |
</div>
|
| 141 |
</div>
|
| 142 |
+
<div class="md:col-span-1">
|
| 143 |
<label class="block text-sm font-medium mb-1">Shipment Status</label>
|
| 144 |
<div class="relative">
|
| 145 |
<select class="w-full bg-gray-100 border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-secondary">
|
|
|
|
| 151 |
</select>
|
| 152 |
</div>
|
| 153 |
</div>
|
| 154 |
+
<div class="md:col-span-1">
|
| 155 |
<label class="block text-sm font-medium mb-1">Port of Entry</label>
|
| 156 |
<div class="relative">
|
| 157 |
<select class="w-full bg-gray-100 border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-secondary">
|
|
|
|
| 164 |
</select>
|
| 165 |
</div>
|
| 166 |
</div>
|
| 167 |
+
<!-- New Filter 1: Origin Country -->
|
| 168 |
+
<div class="md:col-span-1">
|
| 169 |
+
<label class="block text-sm font-medium mb-1">Origin Country</label>
|
| 170 |
+
<div class="relative">
|
| 171 |
+
<select class="w-full bg-gray-100 border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-secondary">
|
| 172 |
+
<option>All Countries</option>
|
| 173 |
+
<option>China</option>
|
| 174 |
+
<option>Germany</option>
|
| 175 |
+
<option>Japan</option>
|
| 176 |
+
<option>Mexico</option>
|
| 177 |
+
<option>Canada</option>
|
| 178 |
+
<option>South Korea</option>
|
| 179 |
+
<option>United Kingdom</option>
|
| 180 |
+
</select>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
<!-- New Filter 2: Destination Region -->
|
| 184 |
+
<div class="md:col-span-1">
|
| 185 |
+
<label class="block text-sm font-medium mb-1">Destination Region</label>
|
| 186 |
+
<div class="relative">
|
| 187 |
+
<select class="w-full bg-gray-100 border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-secondary">
|
| 188 |
+
<option>All Regions</option>
|
| 189 |
+
<option>US East</option>
|
| 190 |
+
<option>US West</option>
|
| 191 |
+
<option>Midwest</option>
|
| 192 |
+
<option>South</option>
|
| 193 |
+
<option>Northeast</option>
|
| 194 |
+
<option>Southwest</option>
|
| 195 |
+
</select>
|
| 196 |
+
</div>
|
| 197 |
+
</div>
|
| 198 |
+
<div class="md:col-span-1 flex items-end">
|
| 199 |
<button class="bg-primary hover:bg-blue-900 text-white py-2 px-4 rounded-lg w-full flex items-center justify-center">
|
| 200 |
<i class="fas fa-filter mr-2"></i> Apply Filters
|
| 201 |
</button>
|
|
|
|
| 325 |
<canvas id="portsChart"></canvas>
|
| 326 |
</div>
|
| 327 |
</div>
|
| 328 |
+
|
| 329 |
+
<!-- Additional Charts -->
|
| 330 |
+
<div class="bg-card rounded-xl shadow-md p-6 chart-card">
|
| 331 |
+
<div class="flex justify-between items-center mb-4">
|
| 332 |
+
<h3 class="text-lg font-semibold">Clearance Times by Origin</h3>
|
| 333 |
+
<button class="bg-gray-100 hover:bg-gray-200 py-1 px-3 rounded-lg text-sm">
|
| 334 |
+
Details
|
| 335 |
+
</button>
|
| 336 |
+
</div>
|
| 337 |
+
<div class="h-80">
|
| 338 |
+
<canvas id="clearanceTimesChart"></canvas>
|
| 339 |
+
</div>
|
| 340 |
+
</div>
|
| 341 |
+
|
| 342 |
+
<div class="bg-card rounded-xl shadow-md p-6 chart-card">
|
| 343 |
+
<div class="flex justify-between items-center mb-4">
|
| 344 |
+
<h3 class="text-lg font-semibold">Value Distribution ($ millions)</h3>
|
| 345 |
+
<select class="bg-gray-100 border border-gray-300 rounded-lg py-1 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-secondary">
|
| 346 |
+
<option selected>Commercial</option>
|
| 347 |
+
<option>Personal</option>
|
| 348 |
+
</select>
|
| 349 |
+
</div>
|
| 350 |
+
<div class="h-80">
|
| 351 |
+
<canvas id="valueDistributionChart"></canvas>
|
| 352 |
+
</div>
|
| 353 |
+
</div>
|
| 354 |
</div>
|
| 355 |
|
| 356 |
<!-- Detailed Shipments Table -->
|
|
|
|
| 395 |
<i class="fas fa-sort ml-1 text-gray-400"></i>
|
| 396 |
</div>
|
| 397 |
</th>
|
| 398 |
+
<th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100">
|
| 399 |
+
<div class="flex items-center">
|
| 400 |
+
<span>Origin</span>
|
| 401 |
+
<i class="fas fa-sort ml-1 text-gray-400"></i>
|
| 402 |
+
</div>
|
| 403 |
+
</th>
|
| 404 |
<th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100">
|
| 405 |
<div class="flex items-center">
|
| 406 |
<span>Status</span>
|
|
|
|
| 484 |
</footer>
|
| 485 |
|
| 486 |
<script>
|
| 487 |
+
// Enhanced synthetic data for all charts
|
| 488 |
const shipmentData = {
|
| 489 |
weeks: ['Week 1', 'Week 2', 'Week 3', 'Week 4', 'Week 5'],
|
| 490 |
shipments: [240, 290, 320, 285, 310],
|
|
|
|
| 496 |
labels: ['Completed', 'In Progress', 'Delayed', 'Pending'],
|
| 497 |
data: [668, 457, 123, 100],
|
| 498 |
colors: ['#22c55e', '#3b82f6', '#f97316', '#a855f7']
|
| 499 |
+
},
|
| 500 |
+
originData: {
|
| 501 |
+
labels: ['China', 'Germany', 'Japan', 'Mexico', 'Canada'],
|
| 502 |
+
clearanceTimes: [2.3, 1.8, 2.1, 1.2, 1.5]
|
| 503 |
+
},
|
| 504 |
+
valueDistribution: {
|
| 505 |
+
labels: ['< $10k', '$10k-50k', '$50k-100k', '$100k-500k', '$500k+'],
|
| 506 |
+
data: [420, 385, 247, 156, 40]
|
| 507 |
}
|
| 508 |
};
|
| 509 |
|
|
|
|
| 522 |
borderColor: '#3b82f6',
|
| 523 |
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
| 524 |
tension: 0.3,
|
| 525 |
+
fill: true,
|
| 526 |
+
pointRadius: 4
|
| 527 |
},
|
| 528 |
{
|
| 529 |
label: 'Completed Shipments',
|
|
|
|
| 531 |
borderColor: '#22c55e',
|
| 532 |
backgroundColor: 'rgba(34, 197, 94, 0.1)',
|
| 533 |
tension: 0.3,
|
| 534 |
+
fill: true,
|
| 535 |
+
pointRadius: 4
|
| 536 |
},
|
| 537 |
{
|
| 538 |
label: 'Delayed Shipments',
|
|
|
|
| 540 |
borderColor: '#f97316',
|
| 541 |
backgroundColor: 'rgba(249, 115, 22, 0.1)',
|
| 542 |
tension: 0.3,
|
| 543 |
+
fill: true,
|
| 544 |
+
pointRadius: 4
|
| 545 |
}
|
| 546 |
]
|
| 547 |
},
|
|
|
|
| 553 |
beginAtZero: true,
|
| 554 |
grid: {
|
| 555 |
color: 'rgba(0, 0, 0, 0.05)'
|
| 556 |
+
},
|
| 557 |
+
title: {
|
| 558 |
+
display: true,
|
| 559 |
+
text: 'Number of Shipments'
|
| 560 |
}
|
| 561 |
},
|
| 562 |
x: {
|
|
|
|
| 583 |
return `${context.dataset.label}: ${context.raw} shipments`;
|
| 584 |
}
|
| 585 |
}
|
| 586 |
+
},
|
| 587 |
+
title: {
|
| 588 |
+
display: true,
|
| 589 |
+
text: 'Weekly Shipment Volume',
|
| 590 |
+
font: {
|
| 591 |
+
size: 16
|
| 592 |
+
}
|
| 593 |
}
|
| 594 |
}
|
| 595 |
}
|
|
|
|
| 626 |
if (data.labels.length && data.datasets.length) {
|
| 627 |
return data.labels.map(function(label, i) {
|
| 628 |
const value = data.datasets[0].data[i];
|
| 629 |
+
const percentage = ((value / shipmentData.statusDistribution.data.reduce((a, b) => a + b, 0)) * 100).toFixed(1);
|
| 630 |
return {
|
| 631 |
text: `${label}: ${value} (${percentage}%)`,
|
| 632 |
fillStyle: data.datasets[0].backgroundColor[i],
|
|
|
|
| 651 |
return `${label}: ${value} shipments (${percentage}%)`;
|
| 652 |
}
|
| 653 |
}
|
| 654 |
+
},
|
| 655 |
+
title: {
|
| 656 |
+
display: true,
|
| 657 |
+
text: 'Status Breakdown',
|
| 658 |
+
font: {
|
| 659 |
+
size: 16
|
| 660 |
+
}
|
| 661 |
}
|
| 662 |
}
|
| 663 |
}
|
|
|
|
| 701 |
x: {
|
| 702 |
grid: {
|
| 703 |
color: 'rgba(0, 0, 0, 0.05)'
|
| 704 |
+
},
|
| 705 |
+
title: {
|
| 706 |
+
display: true,
|
| 707 |
+
text: 'Number of Shipments'
|
| 708 |
}
|
| 709 |
},
|
| 710 |
y: {
|
|
|
|
| 723 |
return `${context.parsed.x} shipments`;
|
| 724 |
}
|
| 725 |
}
|
| 726 |
+
},
|
| 727 |
+
title: {
|
| 728 |
+
display: true,
|
| 729 |
+
text: 'Port Volumes (Annual)',
|
| 730 |
+
font: {
|
| 731 |
+
size: 16
|
| 732 |
+
}
|
| 733 |
+
}
|
| 734 |
+
}
|
| 735 |
+
}
|
| 736 |
+
});
|
| 737 |
+
|
| 738 |
+
// Clearance Times by Origin (Bar Chart)
|
| 739 |
+
const clearanceCtx = document.getElementById('clearanceTimesChart').getContext('2d');
|
| 740 |
+
const clearanceChart = new Chart(clearanceCtx, {
|
| 741 |
+
type: 'bar',
|
| 742 |
+
data: {
|
| 743 |
+
labels: shipmentData.originData.labels,
|
| 744 |
+
datasets: [{
|
| 745 |
+
label: 'Average Clearance (days)',
|
| 746 |
+
data: shipmentData.originData.clearanceTimes,
|
| 747 |
+
backgroundColor: 'rgba(156, 163, 175, 0.7)',
|
| 748 |
+
borderColor: 'rgb(75, 85, 99)',
|
| 749 |
+
borderWidth: 1
|
| 750 |
+
}]
|
| 751 |
+
},
|
| 752 |
+
options: {
|
| 753 |
+
responsive: true,
|
| 754 |
+
maintainAspectRatio: false,
|
| 755 |
+
scales: {
|
| 756 |
+
y: {
|
| 757 |
+
beginAtZero: true,
|
| 758 |
+
grid: {
|
| 759 |
+
color: 'rgba(0, 0, 0, 0.05)'
|
| 760 |
+
},
|
| 761 |
+
title: {
|
| 762 |
+
display: true,
|
| 763 |
+
text: 'Days'
|
| 764 |
+
}
|
| 765 |
+
},
|
| 766 |
+
x: {
|
| 767 |
+
grid: {
|
| 768 |
+
display: false
|
| 769 |
+
}
|
| 770 |
+
}
|
| 771 |
+
},
|
| 772 |
+
plugins: {
|
| 773 |
+
tooltip: {
|
| 774 |
+
callbacks: {
|
| 775 |
+
label: function(context) {
|
| 776 |
+
return `Avg: ${context.raw} days`;
|
| 777 |
+
}
|
| 778 |
+
}
|
| 779 |
+
},
|
| 780 |
+
title: {
|
| 781 |
+
display: true,
|
| 782 |
+
text: 'Clearance Times by Origin',
|
| 783 |
+
font: {
|
| 784 |
+
size: 16
|
| 785 |
+
}
|
| 786 |
+
}
|
| 787 |
+
}
|
| 788 |
+
}
|
| 789 |
+
});
|
| 790 |
+
|
| 791 |
+
// Value Distribution Chart (Horizontal Bar)
|
| 792 |
+
const valueCtx = document.getElementById('valueDistributionChart').getContext('2d');
|
| 793 |
+
const valueChart = new Chart(valueCtx, {
|
| 794 |
+
type: 'bar',
|
| 795 |
+
data: {
|
| 796 |
+
labels: shipmentData.valueDistribution.labels,
|
| 797 |
+
datasets: [{
|
| 798 |
+
label: 'Number of Shipments',
|
| 799 |
+
data: shipmentData.valueDistribution.data,
|
| 800 |
+
backgroundColor: 'rgba(14, 165, 233, 0.7)',
|
| 801 |
+
borderColor: 'rgb(2, 132, 199)',
|
| 802 |
+
borderWidth: 1
|
| 803 |
+
}]
|
| 804 |
+
},
|
| 805 |
+
options: {
|
| 806 |
+
indexAxis: 'y',
|
| 807 |
+
responsive: true,
|
| 808 |
+
maintainAspectRatio: false,
|
| 809 |
+
scales: {
|
| 810 |
+
x: {
|
| 811 |
+
grid: {
|
| 812 |
+
color: 'rgba(0, 0, 0, 0.05)'
|
| 813 |
+
},
|
| 814 |
+
title: {
|
| 815 |
+
display: true,
|
| 816 |
+
text: 'Number of Shipments'
|
| 817 |
+
}
|
| 818 |
+
},
|
| 819 |
+
y: {
|
| 820 |
+
grid: {
|
| 821 |
+
display: false
|
| 822 |
+
}
|
| 823 |
+
}
|
| 824 |
+
},
|
| 825 |
+
plugins: {
|
| 826 |
+
tooltip: {
|
| 827 |
+
callbacks: {
|
| 828 |
+
label: function(context) {
|
| 829 |
+
return `${context.parsed.x} shipments`;
|
| 830 |
+
}
|
| 831 |
+
}
|
| 832 |
+
},
|
| 833 |
+
title: {
|
| 834 |
+
display: true,
|
| 835 |
+
text: 'Shipment Value Distribution',
|
| 836 |
+
font: {
|
| 837 |
+
size: 16
|
| 838 |
+
}
|
| 839 |
}
|
| 840 |
}
|
| 841 |
}
|
|
|
|
| 848 |
const origins = ['China', 'Germany', 'Japan', 'Mexico', 'Canada'];
|
| 849 |
const destinations = ['US East', 'US West', 'US Midwest', 'US South'];
|
| 850 |
|
| 851 |
+
// Generate 25 rows of enhanced synthetic shipment data
|
| 852 |
for (let i = 1; i <= 25; i++) {
|
| 853 |
const port = ports[Math.floor(Math.random() * ports.length)];
|
| 854 |
const status = statuses[Math.floor(Math.random() * statuses.length)];
|
| 855 |
+
const origin = origins[Math.floor(Math.random() * origins.length)];
|
| 856 |
const days = Math.floor(Math.random() * 30) + 1;
|
| 857 |
const arrivalDate = new Date();
|
| 858 |
arrivalDate.setDate(arrivalDate.getDate() + days);
|
|
|
|
| 869 |
${port}
|
| 870 |
</div>
|
| 871 |
</td>
|
| 872 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 873 |
+
<div class="flex items-center">
|
| 874 |
+
<i class="fas fa-globe-americas mr-2 text-green-500"></i>
|
| 875 |
+
${origin}
|
| 876 |
+
</div>
|
| 877 |
+
</td>
|
| 878 |
<td class="px-6 py-4 whitespace-nowrap text-sm">
|
| 879 |
<span class="status-pill" data-status="${status}">
|
| 880 |
<i class="fas fa-${status === 'Completed' ? 'check-circle' : status === 'Delayed' ? 'exclamation-triangle' : status === 'Pending' ? 'hourglass-half' : 'sync-alt'} mr-1"></i>
|
|
|
|
| 923 |
}, 300);
|
| 924 |
});
|
| 925 |
});
|
| 926 |
+
|
| 927 |
+
// Filter change functionality
|
| 928 |
+
document.querySelectorAll('.bg-card select').forEach(select => {
|
| 929 |
+
select.addEventListener('change', function() {
|
| 930 |
+
this.parentElement.parentElement.classList.add('bg-blue-50');
|
| 931 |
+
setTimeout(() => {
|
| 932 |
+
this.parentElement.parentElement.classList.remove('bg-blue-50');
|
| 933 |
+
}, 500);
|
| 934 |
+
});
|
| 935 |
+
});
|
| 936 |
});
|
| 937 |
</script>
|
| 938 |
<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=anonymous111110987654321/customs-brokerage-analytics-dashboard" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
prompts.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
We are creating an analytics dashboard for customs brokerage data. The dashboard should include multiple features and interactions. Key features we can include: 1. Overview cards showing key metrics (e.g., Total Shipments, In Progress, Delayed, Completed) 2. Charts: Line chart for shipment trends, Bar chart for top ports, Pie/Doughnut chart for shipment status distribution 3. Data table with detailed shipment information (with sorting, filtering, pagination) 4. Interactive elements: date range picker, filters by status, port, etc. 5. Use of icons for better visual representation
|
| 2 |
-
there is no data in the charts. Ensure, using synthetic customs brokerage data, that all charts are fully populated with data
|
|
|
|
|
|
| 1 |
We are creating an analytics dashboard for customs brokerage data. The dashboard should include multiple features and interactions. Key features we can include: 1. Overview cards showing key metrics (e.g., Total Shipments, In Progress, Delayed, Completed) 2. Charts: Line chart for shipment trends, Bar chart for top ports, Pie/Doughnut chart for shipment status distribution 3. Data table with detailed shipment information (with sorting, filtering, pagination) 4. Interactive elements: date range picker, filters by status, port, etc. 5. Use of icons for better visual representation
|
| 2 |
+
there is no data in the charts. Ensure, using synthetic customs brokerage data, that all charts are fully populated with data
|
| 3 |
+
add two additional filters to the top section
|