turnaround-optimizer-pro / analysis.html
Kaliman-1981's picture
Need to be able to look at the opportunities visually show example on the file that was uploaded
e673c2b verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Schedule Analysis | Turnaround Optimizer Pro</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.gantt-bar {
height: 24px;
border-radius: 4px;
position: relative;
}
.critical-path {
background-color: rgba(239, 68, 68, 0.7);
}
.optimized-path {
background-color: rgba(16, 185, 129, 0.7);
}
.dependency-line {
position: absolute;
height: 2px;
background-color: #6b7280;
transform-origin: left center;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<div class="container mx-auto px-4 py-8">
<div class="flex justify-between items-center mb-8">
<div>
<h1 class="text-2xl font-bold text-gray-800">Schedule Analysis</h1>
<p class="text-gray-600">Visual optimization opportunities for <span class="font-medium">PIP-2034</span></p>
</div>
<a href="index.html" class="flex items-center text-blue-600 hover:text-blue-800">
<i data-feather="arrow-left" class="w-4 h-4 mr-1"></i> Back to Upload
</a>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-8">
<!-- Overview Card -->
<div class="bg-white rounded-xl shadow-md p-6 lg:col-span-1">
<div class="flex items-center mb-4">
<div class="bg-blue-100 p-2 rounded-full mr-3">
<i data-feather="activity" class="text-blue-500"></i>
</div>
<h2 class="text-xl font-semibold text-gray-800">Optimization Summary</h2>
</div>
<div class="space-y-4">
<div>
<p class="text-sm text-gray-600 mb-1">Original Duration</p>
<p class="text-lg font-medium">7 days</p>
</div>
<div>
<p class="text-sm text-gray-600 mb-1">Optimized Duration</p>
<p class="text-lg font-medium text-green-600">4.5 days</p>
</div>
<div>
<p class="text-sm text-gray-600 mb-1">Savings</p>
<p class="text-lg font-medium">2.5 days (36%)</p>
</div>
<div class="pt-4 border-t border-gray-200">
<p class="text-sm text-gray-600 mb-1">Impact on Critical Path</p>
<div class="w-full bg-gray-200 rounded-full h-2.5 mt-2">
<div class="bg-purple-600 h-2.5 rounded-full" style="width: 78%"></div>
</div>
</div>
</div>
</div>
<!-- Gantt Chart -->
<div class="bg-white rounded-xl shadow-md p-6 lg:col-span-2">
<div class="flex items-center mb-6">
<div class="bg-green-100 p-2 rounded-full mr-3">
<i data-feather="bar-chart-2" class="text-green-500"></i>
</div>
<h2 class="text-xl font-semibold text-gray-800">Gantt Comparison</h2>
</div>
<div class="relative" style="height: 300px;">
<div class="absolute inset-0 overflow-x-auto">
<div class="flex flex-col space-y-8 min-w-max">
<!-- Original Schedule -->
<div>
<div class="flex items-center mb-2">
<span class="text-sm font-medium text-gray-700 mr-4">Original</span>
<span class="text-xs text-gray-500">Day 1 → Day 7</span>
</div>
<div class="gantt-bar critical-path" style="width: 400px;">
<div class="absolute -left-2 -top-2 bg-red-500 text-white text-xs px-1 rounded">PIP-2034</div>
</div>
</div>
<!-- Optimized Schedule -->
<div>
<div class="flex items-center mb-2">
<span class="text-sm font-medium text-gray-700 mr-4">Optimized</span>
<span class="text-xs text-gray-500">Day 1 → Day 4.5</span>
</div>
<div class="flex space-x-8">
<div class="gantt-bar optimized-path" style="width: 200px;">
<div class="absolute -left-2 -top-2 bg-green-500 text-white text-xs px-1 rounded">PIP-2034-A</div>
</div>
<div class="gantt-bar optimized-path" style="width: 150px; margin-left: 50px;">
<div class="absolute -left-2 -top-2 bg-green-500 text-white text-xs px-1 rounded">PIP-2034-B</div>
</div>
</div>
</div>
<!-- Dependency Lines -->
<div class="relative" style="height: 60px;">
<div class="dependency-line" style="width: 50px; top: 30px; left: 200px; transform: rotate(90deg);"></div>
<div class="absolute text-xs text-gray-500" style="left: 210px; top: 15px;">SS+2</div>
</div>
</div>
</div>
</div>
<div class="mt-6">
<div class="flex items-center">
<div class="w-3 h-3 bg-red-500 rounded-full mr-2"></div>
<span class="text-sm text-gray-700">Critical Path</span>
<div class="w-3 h-3 bg-green-500 rounded-full mr-2 ml-4"></div>
<span class="text-sm text-gray-700">Optimized Path</span>
</div>
</div>
</div>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8">
<!-- Productivity Impact -->
<div class="bg-white rounded-xl shadow-md p-6">
<div class="flex items-center mb-4">
<div class="bg-yellow-100 p-2 rounded-full mr-3">
<i data-feather="trending-up" class="text-yellow-500"></i>
</div>
<h2 class="text-xl font-semibold text-gray-800">Productivity Impact</h2>
</div>
<div class="h-64">
<canvas id="productivityChart"></canvas>
</div>
</div>
<!-- Cost Analysis -->
<div class="bg-white rounded-xl shadow-md p-6">
<div class="flex items-center mb-4">
<div class="bg-purple-100 p-2 rounded-full mr-3">
<i data-feather="dollar-sign" class="text-purple-500"></i>
</div>
<h2 class="text-xl font-semibold text-gray-800">Cost Analysis</h2>
</div>
<div class="h-64">
<canvas id="costChart"></canvas>
</div>
</div>
</div>
<!-- Detailed Recommendation -->
<div class="bg-white rounded-xl shadow-md p-6 mb-8">
<div class="flex items-center mb-4">
<div class="bg-blue-100 p-2 rounded-full mr-3">
<i data-feather="clipboard" class="text-blue-500"></i>
</div>
<h2 class="text-xl font-semibold text-gray-800">Implementation Details</h2>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="font-medium text-gray-800 mb-2">Current Logic</h3>
<ul class="list-disc pl-5 space-y-2 text-gray-700">
<li>Finish-to-Start relationship with scaffolding (PIP-2034 → SCA-1234)</li>
<li>Single crew allocation (5 workers)</li>
<li>Standard 5x8 work week</li>
</ul>
</div>
<div>
<h3 class="font-medium text-gray-800 mb-2">Optimized Approach</h3>
<ul class="list-disc pl-5 space-y-2 text-gray-700">
<li>Split into parallel activities (PIP-2034-A/B) with SS+2 relationship</li>
<li>Added swing shift (3 workers) with 1.15x OT multiplier</li>
<li>Prefabricated piping (30% reduction in field work)</li>
</ul>
</div>
</div>
<div class="mt-6 pt-6 border-t border-gray-200">
<h3 class="font-medium text-gray-800 mb-3">Risk Assessment</h3>
<div class="flex items-center space-x-4">
<div class="flex-1">
<div class="flex justify-between text-sm text-gray-600 mb-1">
<span>Safety</span>
<span>Low</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-green-500 h-2 rounded-full" style="width: 20%"></div>
</div>
</div>
<div class="flex-1">
<div class="flex justify-between text-sm text-gray-600 mb-1">
<span>Cost</span>
<span>Medium</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-yellow-500 h-2 rounded-full" style="width: 50%"></div>
</div>
</div>
<div class="flex-1">
<div class="flex justify-between text-sm text-gray-600 mb-1">
<span>Schedule</span>
<span>High</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-red-500 h-2 rounded-full" style="width: 80%"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Export Options -->
<div class="bg-white rounded-xl shadow-md p-6">
<div class="flex flex-col md:flex-row md:items-center md:justify-between">
<div class="mb-4 md:mb-0">
<h2 class="text-lg font-semibold text-gray-800">Export Analysis</h2>
<p class="text-sm text-gray-600">Generate reports for your team</p>
</div>
<div class="flex space-x-3">
<button class="flex items-center px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50">
<i data-feather="download" class="w-4 h-4 mr-2"></i> PDF
</button>
<button class="flex items-center px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50">
<i data-feather="download" class="w-4 h-4 mr-2"></i> Excel
</button>
<button class="flex items-center px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
<i data-feather="share-2" class="w-4 h-4 mr-2"></i> Share
</button>
</div>
</div>
</div>
</div>
<script>
// Initialize charts
document.addEventListener('DOMContentLoaded', function() {
// Productivity Chart
const productivityCtx = document.getElementById('productivityChart').getContext('2d');
new Chart(productivityCtx, {
type: 'bar',
data: {
labels: ['Original', 'Optimized'],
datasets: [{
label: 'Productivity Factor',
data: [0.75, 0.87],
backgroundColor: [
'rgba(239, 68, 68, 0.6)',
'rgba(16, 185, 129, 0.6)'
],
borderColor: [
'rgba(239, 68, 68, 1)',
'rgba(16, 185, 129, 1)'
],
borderWidth: 1
}]
},
options: {
scales: {
y: {
beginAtZero: true,
max: 1.0
}
},
plugins: {
legend: {
display: false
}
}
}
});
// Cost Chart
const costCtx = document.getElementById('costChart').getContext('2d');
new Chart(costCtx, {
type: 'doughnut',
data: {
labels: ['Labor Savings', 'Overtime Cost', 'Material Cost', 'Equipment'],
datasets: [{
data: [12500, -4800, 2000, 1000],
backgroundColor: [
'rgba(16, 185, 129, 0.6)',
'rgba(239, 68, 68, 0.6)',
'rgba(59, 130, 246, 0.6)',
'rgba(249, 115, 22, 0.6)'
],
borderColor: [
'rgba(16, 185, 129, 1)',
'rgba(239, 68, 68, 1)',
'rgba(59, 130, 246, 1)',
'rgba(249, 115, 22, 1)'
],
borderWidth: 1
}]
},
options: {
plugins: {
legend: {
position: 'right'
}
}
}
});
// Initialize feather icons
feather.replace();
});
</script>
</body>
</html>