Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Plan & Forecast Module | PipeFlow 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> | |
| <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script> | |
| <style> | |
| .sidebar { | |
| transition: all 0.3s ease; | |
| } | |
| .kpi-card { | |
| transition: all 0.3s ease; | |
| } | |
| .kpi-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); | |
| } | |
| .data-table th { | |
| background-color: #f3f4f6; | |
| font-weight: 600; | |
| } | |
| .data-table tr:nth-child(even) { | |
| background-color: #f9fafb; | |
| } | |
| .data-table tr:hover { | |
| background-color: #f1f5f9; | |
| } | |
| .gantt-task { | |
| height: 30px; | |
| border-radius: 4px; | |
| display: flex; | |
| align-items: center; | |
| padding: 0 8px; | |
| font-size: 12px; | |
| color: white; | |
| position: relative; | |
| } | |
| .gantt-task::after { | |
| content: ''; | |
| position: absolute; | |
| right: -5px; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| border: 5px solid transparent; | |
| border-left-color: inherit; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 font-sans"> | |
| <!-- Vanta.js Background --> | |
| <div id="vanta-bg" class="fixed top-0 left-0 w-full h-full z-0"></div> | |
| <!-- Main Layout --> | |
| <div class="relative z-10 flex h-screen overflow-hidden"> | |
| <!-- Sidebar --> | |
| <div class="sidebar bg-gray-800 text-white w-64 flex-shrink-0 transform -translate-x-full md:translate-x-0 transition duration-300 ease-in-out"> | |
| <div class="p-4 border-b border-gray-700"> | |
| <div class="flex items-center space-x-2"> | |
| <img src="http://static.photos/green/100x100/133" alt="Greenberry Logo" class="w-8 h-8 rounded-full"> | |
| <h1 class="text-xl font-bold">PipeFlow Pro</h1> | |
| </div> | |
| <p class="text-gray-400 text-sm mt-1">Industrial Piping Command Center</p> | |
| </div> | |
| <nav class="p-4"> | |
| <div class="mb-6"> | |
| <h3 class="text-xs uppercase tracking-wider text-gray-400 mb-3">Modules</h3> | |
| <ul class="space-y-2"> | |
| <li> | |
| <a href="index.html" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-700"> | |
| <i data-feather="home" class="w-5 h-5"></i> | |
| <span>Dashboard</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="financial.html" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-700"> | |
| <i data-feather="dollar-sign" class="w-5 h-5"></i> | |
| <span>Financial</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="tracking.html" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-700"> | |
| <i data-feather="activity" class="w-5 h-5"></i> | |
| <span>Tracking</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="earned-value.html" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-700"> | |
| <i data-feather="trending-up" class="w-5 h-5"></i> | |
| <span>Earned Value</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="plan-forecast.html" class="flex items-center space-x-2 p-2 rounded-lg bg-gray-700 text-white"> | |
| <i data-feather="calendar" class="w-5 h-5"></i> | |
| <span>Plan & Forecast</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-xs uppercase tracking-wider text-gray-400 mb-3">Settings</h3> | |
| <ul class="space-y-2"> | |
| <li> | |
| <a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-700"> | |
| <i data-feather="user" class="w-5 h-5"></i> | |
| <span>Profile</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-700"> | |
| <i data-feather="settings" class="w-5 h-5"></i> | |
| <span>Settings</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-700"> | |
| <i data-feather="tool" class="w-5 h-5"></i> | |
| <span>Options</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-700"> | |
| <i data-feather="folder" class="w-5 h-5"></i> | |
| <span>Project Management</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| </nav> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="flex-1 overflow-auto"> | |
| <!-- Top Navigation --> | |
| <header class="bg-white shadow-sm"> | |
| <div class="flex items-center justify-between px-6 py-4"> | |
| <div class="flex items-center space-x-4"> | |
| <button id="sidebar-toggle" class="md:hidden text-gray-500"> | |
| <i data-feather="menu"></i> | |
| </button> | |
| <h2 class="text-xl font-semibold text-gray-800">Plan & Forecast Module</h2> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <div class="relative"> | |
| <i data-feather="bell" class="text-gray-500"></i> | |
| <span class="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full"></span> | |
| </div> | |
| <div class="flex items-center space-x-2"> | |
| <img src="https://static.photos/people/40x40/1" alt="User" class="w-8 h-8 rounded-full"> | |
| <span class="text-sm font-medium">John Doe</span> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Plan & Forecast Content --> | |
| <main class="p-6"> | |
| <!-- Header --> | |
| <div class="mb-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <h3 class="text-lg font-semibold">Project Planning & Forecasting</h3> | |
| <p class="text-gray-600">Manage schedules, milestones, and predictive analytics</p> | |
| </div> | |
| <div class="flex space-x-3"> | |
| <button class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 flex items-center"> | |
| <i data-feather="download" class="w-4 h-4 mr-2"></i> | |
| Export Gantt | |
| </button> | |
| <button class="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 flex items-center"> | |
| <i data-feather="plus" class="w-4 h-4 mr-2"></i> | |
| Add Task | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Planning KPIs --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"> | |
| <div class="kpi-card bg-white rounded-xl shadow-md overflow-hidden"> | |
| <div class="p-5"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <span class="text-gray-500">Project Duration</span> | |
| <div class="bg-blue-100 p-2 rounded-full"> | |
| <i data-feather="clock" class="text-blue-500 w-5 h-5"></i> | |
| </div> | |
| </div> | |
| <h4 class="text-2xl font-bold mb-2">180 Days</h4> | |
| <div class="flex items-center text-sm"> | |
| <span class="text-gray-500 mr-2">Start: Jan 15, 2023</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="kpi-card bg-white rounded-xl shadow-md overflow-hidden"> | |
| <div class="p-5"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <span class="text-gray-500">Critical Path</span> | |
| <div class="bg-purple-100 p-2 rounded-full"> | |
| <i data-feather="alert-triangle" class="text-purple-500 w-5 h-5"></i> | |
| </div> | |
| </div> | |
| <h4 class="text-2xl font-bold mb-2">45 Days</h4> | |
| <div class="flex items-center text-sm"> | |
| <span class="text-gray-500 mr-2">Longest sequence</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="kpi-card bg-white rounded-xl shadow-md overflow-hidden"> | |
| <div class="p-5"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <span class="text-gray-500">Milestones</span> | |
| <div class="bg-green-100 p-2 rounded-full"> | |
| <i data-feather="flag" class="text-green-500 w-5 h-5"></i> | |
| </div> | |
| </div> | |
| <h4 class="text-2xl font-bold mb-2">12</h4> | |
| <div class="flex items-center text-sm"> | |
| <span class="text-gray-500 mr-2">8 completed</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="kpi-card bg-white rounded-xl shadow-md overflow-hidden"> | |
| <div class="p-5"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <span class="text-gray-500">Forecast Accuracy</span> | |
| <div class="bg-yellow-100 p-2 rounded-full"> | |
| <i data-feather="target" class="text-yellow-500 w-5 h-5"></i> | |
| </div> | |
| </div> | |
| <h4 class="text-2xl font-bold mb-2">87%</h4> | |
| <div class="flex items-center text-sm"> | |
| <span class="text-gray-500 mr-2">Based on historical data</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Gantt Chart Section --> | |
| <div class="bg-white rounded-lg shadow p-6 mb-8"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h3 class="text-lg font-semibold">Project Gantt Chart</h3> | |
| <div class="flex space-x-2"> | |
| <button class="px-3 py-1 text-sm bg-blue-500 text-white rounded-lg">Monthly</button> | |
| <button class="px-3 py-1 text-sm border border-gray-300 rounded-lg">Quarterly</button> | |
| </div> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <div class="min-w-full"> | |
| <!-- Timeline Header --> | |
| <div class="flex border-b border-gray-200 pb-2 mb-2"> | |
| <div class="w-1/4 font-medium text-gray-700">Task</div> | |
| <div class="w-3/4 grid grid-cols-12 gap-1"> | |
| <div class="text-center text-xs text-gray-500">J1</div> | |
| <div class="text-center text-xs text-gray-500">F1</div> | |
| <div class="text-center text-xs text-gray-500">M1</div> | |
| <div class="text-center text-xs text-gray-500">A1</div> | |
| <div class="text-center text-xs text-gray-500">M1</div> | |
| <div class="text-center text-xs text-gray-500">J1</div> | |
| <div class="text-center text-xs text-gray-500">J2</div> | |
| <div class="text-center text-xs text-gray-500">A2</div> | |
| <div class="text-center text-xs text-gray-500">S1</div> | |
| <div class="text-center text-xs text-gray-500">O1</div> | |
| <div class="text-center text-xs text-gray-500">N1</div> | |
| <div class="text-center text-xs text-gray-500">D1</div> | |
| </div> | |
| </div> | |
| <!-- Gantt Rows --> | |
| <div class="space-y-3"> | |
| <!-- Task 1 --> | |
| <div class="flex items-center"> | |
| <div class="w-1/4 text-sm font-medium text-gray-900">Foundation Work</div> | |
| <div class="w-3/4 relative h-8"> | |
| <div class="absolute top-1 h-6 bg-blue-500 rounded" style="width: 25%; left: 0;"></div> | |
| </div> | |
| </div> | |
| <!-- Task 2 --> | |
| <div class="flex items-center"> | |
| <div class="w-1/4 text-sm font-medium text-gray-900">Structural Steel</div> | |
| <div class="w-3/4 relative h-8"> | |
| <div class="absolute top-1 h-6 bg-green-500 rounded" style="width: 33%; left: 20%;"></div> | |
| </div> | |
| </div> | |
| <!-- Task 3 --> | |
| <div class="flex items-center"> | |
| <div class="w-1/4 text-sm font-medium text-gray-900">Piping Installation</div> | |
| <div class="w-3/4 relative h-8"> | |
| <div class="absolute top-1 h-6 bg-yellow-500 rounded" style="width: 42%; left: 33%;"></div> | |
| </div> | |
| </div> | |
| <!-- Task 4 --> | |
| <div class="flex items-center"> | |
| <div class="w-1/4 text-sm font-medium text-gray-900">Hydro Testing</div> | |
| <div class="w-3/4 relative h-8"> | |
| <div class="absolute top-1 h-6 bg-purple-500 rounded" style="width: 17%; left: 65%;"></div> | |
| </div> | |
| </div> | |
| <!-- Task 5 --> | |
| <div class="flex items-center"> | |
| <div class="w-1/4 text-sm font-medium text-gray-900">Inspection & QA</div> | |
| <div class="w-3/4 relative h-8"> | |
| <div class="absolute top-1 h-6 bg-red-500 rounded" style="width: 25%; left: 75%;"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Forecasting Charts --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"> | |
| <!-- Completion Forecast --> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h3 class="text-lg font-semibold">Completion Forecast</h3> | |
| <div class="flex items-center space-x-2"> | |
| <span class="text-sm text-gray-500">Based on current progress</span> | |
| </div> | |
| </div> | |
| <canvas id="completionChart" height="250"></canvas> | |
| </div> | |
| <!-- Resource Forecast --> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h3 class="text-lg font-semibold">Resource Forecast</h3> | |
| <div class="flex items-center space-x-2"> | |
| <span class="text-sm text-gray-500">Next 30 days</span> | |
| </div> | |
| </div> | |
| <canvas id="resourceChart" height="250"></canvas> | |
| </div> | |
| </div> | |
| <!-- Upcoming Milestones --> | |
| <div class="bg-white rounded-lg shadow overflow-hidden mb-8"> | |
| <div class="px-6 py-4 border-b border-gray-200"> | |
| <h3 class="text-lg font-semibold">Upcoming Milestones</h3> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="data-table min-w-full divide-y divide-gray-200"> | |
| <thead> | |
| <tr> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Milestone</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Target Date</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Dependencies</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Progress</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Zone 3 Piping Complete</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 25, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Material Delivery</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">In Progress</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="w-24 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-blue-500 h-2 rounded-full" style="width: 65%"></div> | |
| </div> | |
| <span class="text-sm text-gray-900">65%</span> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Hydro Testing Start</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">June 5, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Zone 3 Complete</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">Scheduled</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="w-24 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-gray-500 h-2 rounded-full" style="width: 0%"></div> | |
| </div> | |
| <span class="text-sm text-gray-900">0%</span> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Zone 4 Material Delivery</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">June 12, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Procurement</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">Confirmed</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="w-24 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-green-500 h-2 rounded-full" style="width: 100%"></div> | |
| </div> | |
| <span class="text-sm text-gray-900">100%</span> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Project Midpoint Review</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">June 20, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">All prior milestones</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">Scheduled</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="w-24 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-gray-500 h-2 rounded-full" style="width: 0%"></div> | |
| </div> | |
| <span class="text-sm text-gray-900">0%</span> | |
| </div> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Risk Forecast --> | |
| <div class="bg-white rounded-lg shadow overflow-hidden"> | |
| <div class="px-6 py-4 border-b border-gray-200"> | |
| <h3 class="text-lg font-semibold">Risk Forecast</h3> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="data-table min-w-full divide-y divide-gray-200"> | |
| <thead> | |
| <tr> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Risk</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Probability</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Impact</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Mitigation Strategy</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Forecasted Date</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Weather Delays</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Medium (60%)</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-500 font-medium">Medium</td> | |
| <td class="px-6 py-4 text-sm text-gray-500">Adjust schedule for weather windows</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 30, 2023</td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Material Shortage</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Low (30%)</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-red-500 font-medium">High</td> | |
| <td class="px-6 py-4 text-sm text-gray-500">Maintain 15% buffer stock</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">June 15, 2023</td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Labor Shortage</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">High (80%)</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-red-500 font-medium">High</td> | |
| <td class="px-6 py-4 text-sm text-gray-500">Secure backup contractors</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">July 5, 2023</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // Initialize Vanta.js background | |
| VANTA.NET({ | |
| el: "#vanta-bg", | |
| color: 0x3b82f6, | |
| backgroundColor: 0xf8fafc, | |
| points: 12, | |
| maxDistance: 20, | |
| spacing: 15 | |
| }); | |
| // Toggle sidebar on mobile | |
| document.getElementById('sidebar-toggle').addEventListener('click', function() { | |
| document.querySelector('.sidebar').classList.toggle('translate-x-0'); | |
| }); | |
| // Initialize Completion Forecast Chart | |
| const completionCtx = document.getElementById('completionChart').getContext('2d'); | |
| const completionChart = new Chart(completionCtx, { | |
| type: 'line', | |
| data: { | |
| labels: ['Week 1', 'Week 2', 'Week 3', 'Week 4', 'Week 5', 'Week 6', 'Week 7', 'Week 8'], | |
| datasets: [ | |
| { | |
| label: 'Planned Completion', | |
| data: [5, 12, 20, 30, 45, 55, 70, 85], | |
| borderColor: 'rgba(99, 102, 241, 1)', | |
| backgroundColor: 'rgba(99, 102, 241, 0.1)', | |
| borderWidth: 2, | |
| tension: 0.3, | |
| fill: true | |
| }, | |
| { | |
| label: 'Forecasted Completion', | |
| data: [7, 15, 25, 35, 48, 60, 72, 85], | |
| borderColor: 'rgba(16, 185, 129, 1)', | |
| backgroundColor: 'rgba(16, 185, 129, 0.1)', | |
| borderWidth: 2, | |
| borderDash: [5, 5], | |
| tension: 0.3, | |
| fill: true | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| plugins: { | |
| legend: { | |
| position: 'top', | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return context.dataset.label + ': ' + context.parsed.y + '%'; | |
| } | |
| } | |
| } | |
| }, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| max: 100, | |
| ticks: { | |
| callback: function(value) { | |
| return value + '%'; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Initialize Resource Forecast Chart | |
| const resourceCtx = document.getElementById('resourceChart').getContext('2d'); | |
| const resourceChart = new Chart(resourceCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Week 1', 'Week 2', 'Week 3', 'Week 4'], | |
| datasets: [ | |
| { | |
| label: 'Labor (FTE)', | |
| data: [15, 18, 22, 19], | |
| backgroundColor: 'rgba(59, 130, 246, 0.7)', | |
| borderColor: 'rgba(59, 130, 246, 1)', | |
| borderWidth: 1 | |
| }, | |
| { | |
| label: 'Equipment', | |
| data: [8, 10, 12, 9], | |
| backgroundColor: 'rgba(16, 185, 129, 0.7)', | |
| borderColor: 'rgba(16, 185, 129, 1)', | |
| borderWidth: 1 | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| plugins: { | |
| legend: { | |
| position: 'top', | |
| } | |
| }, | |
| scales: { | |
| y: { | |
| beginAtZero: true | |
| } | |
| } | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |