undefined / tracking.html
FlipFlopsNSocks's picture
change Preferences to Settings and add options and Project managment varibles
e38db94 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tracking 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/vanta@latest/dist/vanta.net.min.js"></script>
<style>
.sidebar {
transition: all 0.3s ease;
}
.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;
}
.form-input {
transition: all 0.2s ease;
}
.form-input:focus {
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
</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 bg-gray-700 text-white">
<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 bg-gray-700 text-white">
<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 hover:bg-gray-700">
<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">Tracking 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>
<!-- Tracking Content -->
<main class="p-6">
<!-- Header -->
<div class="mb-6">
<div class="flex items-center justify-between">
<div>
<h3 class="text-lg font-semibold">Tracking Log</h3>
<p class="text-gray-600">Manage and update installed quantities for project tracking</p>
</div>
<button id="add-entry-btn" 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 Entry
</button>
</div>
</div>
<!-- Add Entry Form (Hidden by default) -->
<div id="entry-form" class="bg-white rounded-lg shadow mb-6 p-6 hidden">
<h4 class="text-md font-semibold mb-4">Add New Tracking Entry</h4>
<form id="tracking-form">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Drawing Number</label>
<input type="text" id="drawing-number" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="e.g. PIP-1001">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">System</label>
<input type="text" id="system" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="e.g. Fire Water">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Area</label>
<input type="text" id="area" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="e.g. Zone 3">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Category</label>
<select id="category" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md">
<option value="">Select Category</option>
<option value="Pipe Spool">Pipe Spool</option>
<option value="Welding">Welding</option>
<option value="Valve Handling">Valve Handling</option>
<option value="Pipe Support">Pipe Support</option>
<option value="Bolt up">Bolt up</option>
<option value="Hydro">Hydro</option>
<option value="QC Buy-off">QC Buy-off</option>
</select>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4 mb-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Budget Quantity</label>
<input type="number" id="budget-qty" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="0">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Installed Quantity</label>
<input type="number" id="installed-qty" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="0">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Unit Manhours</label>
<input type="number" id="unit-manhours" step="0.01" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="0.00">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Earned Man-Hours</label>
<input type="number" id="earned-manhours" step="0.01" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="0.00" readonly>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Percent Complete</label>
<input type="number" id="percent-complete" class="form-input w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="0" readonly>
</div>
</div>
<div class="flex justify-end space-x-3">
<button type="button" id="cancel-entry" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50">Cancel</button>
<button type="submit" class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600">Save Entry</button>
</div>
</form>
</div>
<!-- Data Table -->
<div class="bg-white rounded-lg shadow overflow-hidden">
<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">Drawing Number</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">System</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Area</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Category</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Budget Qty</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Installed Qty</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Unit Manhours</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Earned Man-Hours</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Percent Complete</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<!-- Sample Data Row -->
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">PIP-2001</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Fire Water</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Zone 3</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Pipe Spool</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">120</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">95</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">2.5</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">237.5</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="w-16 bg-gray-200 rounded-full h-2 mr-2">
<div class="bg-blue-500 h-2 rounded-full" style="width: 79%"></div>
</div>
<span class="text-sm text-gray-900">79%</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-500 hover:text-blue-700 mr-3">
<i data-feather="edit" class="w-4 h-4"></i>
</button>
<button class="text-red-500 hover:text-red-700">
<i data-feather="trash" class="w-4 h-4"></i>
</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">PIP-2002</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Process</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Zone 2</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Welding</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">85</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">72</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">3.2</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">230.4</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="w-16 bg-gray-200 rounded-full h-2 mr-2">
<div class="bg-green-500 h-2 rounded-full" style="width: 85%"></div>
</div>
<span class="text-sm text-gray-900">85%</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-500 hover:text-blue-700 mr-3">
<i data-feather="edit" class="w-4 h-4"></i>
</button>
<button class="text-red-500 hover:text-red-700">
<i data-feather="trash" class="w-4 h-4"></i>
</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">PIP-3005</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Steam</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Zone 4</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Pipe Support</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">45</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">38</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">1.8</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">68.4</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="w-16 bg-gray-200 rounded-full h-2 mr-2">
<div class="bg-yellow-500 h-2 rounded-full" style="width: 84%"></div>
</div>
<span class="text-sm text-gray-900">84%</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-500 hover:text-blue-700 mr-3">
<i data-feather="edit" class="w-4 h-4"></i>
</button>
<button class="text-red-500 hover:text-red-700">
<i data-feather="trash" class="w-4 h-4"></i>
</button>
</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');
});
// Show/hide entry form
document.getElementById('add-entry-btn').addEventListener('click', function() {
document.getElementById('entry-form').classList.toggle('hidden');
});
document.getElementById('cancel-entry').addEventListener('click', function() {
document.getElementById('entry-form').classList.add('hidden');
document.getElementById('tracking-form').reset();
});
// Calculate earned man-hours and percent complete
document.getElementById('installed-qty').addEventListener('input', calculateValues);
document.getElementById('unit-manhours').addEventListener('input', calculateValues);
document.getElementById('budget-qty').addEventListener('input', calculateValues);
function calculateValues() {
const installedQty = parseFloat(document.getElementById('installed-qty').value) || 0;
const unitManhours = parseFloat(document.getElementById('unit-manhours').value) || 0;
const budgetQty = parseFloat(document.getElementById('budget-qty').value) || 1;
const earnedManhours = installedQty * unitManhours;
const percentComplete = (installedQty / budgetQty) * 100;
document.getElementById('earned-manhours').value = earnedManhours.toFixed(2);
document.getElementById('percent-complete').value = isNaN(percentComplete) ? 0 : percentComplete.toFixed(0);
}
// Form submission
document.getElementById('tracking-form').addEventListener('submit', function(e) {
e.preventDefault();
// In a real application, this would submit to a server
alert('Entry saved successfully!');
document.getElementById('entry-form').classList.add('hidden');
this.reset();
});
</script>
</body>
</html>