Spaces:
Running

erp-software / index.html
bmolokwane's picture
Reports and Procurement are not loading assets as well can you fix that? - Follow Up Deployment
a321560 verified
Raw History Blame Contribute Delete
36.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BizERP - Business Management Solution</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar.collapsed {
width: 70px;
}
.sidebar.collapsed .nav-text {
display: none;
}
.dashboard-card:hover {
transform: translateY(-5px);
transition: all 0.3s ease;
}
.chart-container {
height: 300px;
}
@media (max-width: 768px) {
.sidebar {
position: absolute;
z-index: 100;
height: 100vh;
}
.main-content {
margin-left: 0 !important;
}
}
</style>
</head>
<body class="bg-gray-100">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar bg-blue-900 text-white w-64 flex-shrink-0">
<div class="p-4 flex items-center justify-between border-b border-blue-800">
<div class="flex items-center space-x-3">
<i class="fas fa-building text-2xl text-blue-300"></i>
<span class="text-xl font-bold">BizERP</span>
</div>
<button id="toggleSidebar" class="text-blue-300 hover:text-white">
<i class="fas fa-bars"></i>
</button>
</div>
<div class="p-4 border-b border-blue-800">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-blue-700 flex items-center justify-center">
<i class="fas fa-user"></i>
</div>
<div class="nav-text">
<div class="font-medium">Admin User</div>
<div class="text-xs text-blue-300">Administrator</div>
</div>
</div>
</div>
<nav class="mt-4">
<a href="#" class="flex items-center px-4 py-3 text-white bg-blue-800">
<i class="fas fa-tachometer-alt w-6 text-center"></i>
<span class="nav-text ml-3">Dashboard</span>
</a>
<a href="#" data-section="invoices" class="flex items-center px-4 py-3 text-blue-200 hover:bg-blue-800 hover:text-white">
<i class="fas fa-file-invoice-dollar w-6 text-center"></i>
<span class="nav-text ml-3">Invoices</span>
</a>
<a href="#" data-section="inventory" class="flex items-center px-4 py-3 text-blue-200 hover:bg-blue-800 hover:text-white">
<i class="fas fa-boxes w-6 text-center"></i>
<span class="nav-text ml-3">Inventory</span>
</a>
<a href="#" data-section="assets" class="flex items-center px-4 py-3 text-blue-200 hover:bg-blue-800 hover:text-white">
<i class="fas fa-hard-hat w-6 text-center"></i>
<span class="nav-text ml-3">Assets</span>
</a>
<a href="#" data-section="procurement" class="flex items-center px-4 py-3 text-blue-200 hover:bg-blue-800 hover:text-white">
<i class="fas fa-truck-loading w-6 text-center"></i>
<span class="nav-text ml-3">Procurement</span>
</a>
<a href="#" data-section="reports" class="flex items-center px-4 py-3 text-blue-200 hover:bg-blue-800 hover:text-white">
<i class="fas fa-chart-bar w-6 text-center"></i>
<span class="nav-text ml-3">Reports</span>
</a>
<div class="px-4 py-3 text-blue-300 uppercase text-xs font-bold mt-4 nav-text">Industry Specific</div>
<a href="#" data-section="mining" class="flex items-center px-4 py-3 text-blue-200 hover:bg-blue-800 hover:text-white">
<i class="fas fa-mountain w-6 text-center"></i>
<span class="nav-text ml-3">Mining Module</span>
</a>
<a href="#" data-section="construction" class="flex items-center px-4 py-3 text-blue-200 hover:bg-blue-800 hover:text-white">
<i class="fas fa-tools w-6 text-center"></i>
<span class="nav-text ml-3">Construction Module</span>
</a>
</nav>
</div>
<!-- Main Content -->
<div class="main-content flex-1 overflow-y-auto ml-64">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="flex justify-between items-center px-6 py-4">
<h1 class="text-2xl font-bold text-gray-800">Dashboard</h1>
<div class="flex items-center space-x-4">
<div class="relative">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
<input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<button class="p-2 rounded-full bg-gray-100 hover:bg-gray-200">
<i class="fas fa-bell text-gray-600"></i>
<span class="sr-only">Notifications</span>
</button>
<div class="flex items-center space-x-2">
<div class="w-8 h-8 rounded-full bg-blue-600 flex items-center justify-center text-white">
<i class="fas fa-user"></i>
</div>
<span class="hidden md:inline">Admin</span>
</div>
</div>
</div>
</header>
<!-- Content -->
<main class="p-6">
<!-- Dashboard Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<div class="dashboard-card bg-white rounded-lg shadow p-6 flex items-center">
<div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4">
<i class="fas fa-dollar-sign text-xl"></i>
</div>
<div>
<p class="text-gray-500">Total Revenue</p>
<h3 class="text-2xl font-bold">$45,231</h3>
<p class="text-green-500 text-sm">+12% from last month</p>
</div>
</div>
<div class="dashboard-card bg-white rounded-lg shadow p-6 flex items-center">
<div class="p-3 rounded-full bg-green-100 text-green-600 mr-4">
<i class="fas fa-shopping-cart text-xl"></i>
</div>
<div>
<p class="text-gray-500">Orders</p>
<h3 class="text-2xl font-bold">1,259</h3>
<p class="text-red-500 text-sm">-2% from last month</p>
</div>
</div>
<div class="dashboard-card bg-white rounded-lg shadow p-6 flex items-center">
<div class="p-3 rounded-full bg-yellow-100 text-yellow-600 mr-4">
<i class="fas fa-users text-xl"></i>
</div>
<div>
<p class="text-gray-500">Customers</p>
<h3 class="text-2xl font-bold">324</h3>
<p class="text-green-500 text-sm">+8% from last month</p>
</div>
</div>
<div class="dashboard-card bg-white rounded-lg shadow p-6 flex items-center">
<div class="p-3 rounded-full bg-red-100 text-red-600 mr-4">
<i class="fas fa-box-open text-xl"></i>
</div>
<div>
<p class="text-gray-500">Inventory Items</p>
<h3 class="text-2xl font-bold">1,542</h3>
<p class="text-green-500 text-sm">+3% from last month</p>
</div>
</div>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold">Revenue Overview</h2>
<select class="border rounded px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
<option>This Year</option>
<option>Last Year</option>
<option>Quarterly</option>
</select>
</div>
<div class="chart-container">
<!-- This would be replaced with an actual chart in production -->
<div class="bg-gray-100 rounded h-full flex items-center justify-center">
<p class="text-gray-500">Revenue Chart Placeholder</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold">Inventory Levels</h2>
<select class="border rounded px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
<option>All Categories</option>
<option>Mining</option>
<option>Construction</option>
<option>Office Supplies</option>
</select>
</div>
<div class="chart-container">
<!-- This would be replaced with an actual chart in production -->
<div class="bg-gray-100 rounded h-full flex items-center justify-center">
<p class="text-gray-500">Inventory Chart Placeholder</p>
</div>
</div>
</div>
</div>
<!-- Recent Activities -->
<div class="grid grid-cols-1 gap-6">
<div class="bg-white p-6 rounded-lg shadow">
<h2 class="text-lg font-semibold mb-4">Recent Activities</h2>
<div class="space-y-4">
<div class="flex items-start">
<div class="p-2 bg-blue-100 text-blue-600 rounded-lg mr-4">
<i class="fas fa-file-invoice"></i>
</div>
<div>
<p class="font-medium">New invoice #INV-0052 created</p>
<p class="text-gray-500 text-sm">2 hours ago</p>
</div>
<div class="ml-auto text-sm text-blue-600">View</div>
</div>
<div class="flex items-start">
<div class="p-2 bg-green-100 text-green-600 rounded-lg mr-4">
<i class="fas fa-truck"></i>
</div>
<div>
<p class="font-medium">New delivery scheduled</p>
<p class="text-gray-500 text-sm">4 hours ago</p>
</div>
<div class="ml-auto text-sm text-green-600">Track</div>
</div>
<div class="flex items-start">
<div class="p-2 bg-purple-100 text-purple-600 rounded-lg mr-4">
<i class="fas fa-hard-hat"></i>
</div>
<div>
<p class="font-medium">Maintenance scheduled for excavator #EXC-102</p>
<p class="text-gray-500 text-sm">1 day ago</p>
</div>
<div class="ml-auto text-sm text-purple-600">Details</div>
</div>
<div class="flex items-start">
<div class="p-2 bg-red-100 text-red-600 rounded-lg mr-4">
<i class="fas fa-exclamation-triangle"></i>
</div>
<div>
<p class="font-medium">Low stock alert: Steel bars (500 remaining)</p>
<p class="text-gray-500 text-sm">2 days ago</p>
</div>
<div class="ml-auto text-sm text-red-600">Reorder</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<!-- Invoice Modal (hidden by default) -->
<div id="invoiceModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-screen overflow-y-auto">
<div class="flex justify-between items-center p-4 border-b">
<h3 class="text-lg font-semibold">Create New Invoice</h3>
<button id="closeInvoiceModal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6">
<form>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div>
<label class="block text-gray-700 mb-2">Client Name</label>
<input type="text" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label class="block text-gray-700 mb-2">Invoice Date</label>
<input type="date" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label class="block text-gray-700 mb-2">Invoice Number</label>
<input type="text" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="e.g. INV-001">
</div>
<div>
<label class="block text-gray-700 mb-2">Due Date</label>
<input type="date" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
</div>
<div class="mb-6">
<h4 class="font-medium text-gray-700 mb-3">Items</h4>
<div class="overflow-x-auto">
<table class="min-w-full bg-white">
<thead>
<tr class="bg-gray-100">
<th class="py-2 px-4 text-left">Item</th>
<th class="py-2 px-4 text-left">Description</th>
<th class="py-2 px-4 text-left">Quantity</th>
<th class="py-2 px-4 text-left">Price</th>
<th class="py-2 px-4 text-left">Total</th>
<th class="py-2 px-4 text-left"></th>
</tr>
</thead>
<tbody>
<tr class="border-b">
<td class="py-2 px-4">
<select class="w-full px-3 py-1 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500">
<option>Select Item</option>
<option>Steel Beams</option>
<option>Cement Bags</option>
<option>Safety Helmets</option>
</select>
</td>
<td class="py-2 px-4">
<input type="text" class="w-full px-3 py-1 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Description">
</td>
<td class="py-2 px-4">
<input type="number" class="w-20 px-3 py-1 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500" value="1">
</td>
<td class="py-2 px-4">
<input type="number" class="w-24 px-3 py-1 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="0.00">
</td>
<td class="py-2 px-4">$0.00</td>
<td class="py-2 px-4">
<button type="button" class="text-red-500 hover:text-red-700">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<button type="button" class="mt-2 text-blue-600 hover:text-blue-800">
<i class="fas fa-plus-circle mr-1"></i> Add Item
</button>
</div>
<div class="flex justify-between">
<div class="w-1/3">
<label class="block text-gray-700 mb-2">Notes</label>
<textarea class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" rows="3" placeholder="Any additional notes..."></textarea>
</div>
<div class="w-1/3">
<div class="bg-gray-50 p-4 rounded-lg">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Subtotal:</span>
<span>$0.00</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Tax (10%):</span>
<span>$0.00</span>
</div>
<div class="flex justify-between font-bold text-lg">
<span>Total:</span>
<span>$0.00</span>
</div>
</div>
</div>
</div>
<div class="mt-6 flex justify-end space-x-3">
<button type="button" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-100">Cancel</button>
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">Save Invoice</button>
</div>
</form>
</div>
</div>
</div>
<script>
// Toggle sidebar
document.getElementById('toggleSidebar').addEventListener('click', function() {
document.querySelector('.sidebar').classList.toggle('collapsed');
document.querySelector('.main-content').classList.toggle('ml-64');
document.querySelector('.main-content').classList.toggle('ml-16');
});
// Responsive sidebar handling
function handleResponsiveSidebar() {
if (window.innerWidth < 768) {
document.querySelector('.sidebar').classList.add('collapsed');
document.querySelector('.main-content').classList.remove('ml-64');
} else {
document.querySelector('.sidebar').classList.remove('collapsed');
document.querySelector('.main-content').classList.add('ml-64');
}
}
// Initial check on page load
handleResponsiveSidebar();
// Check on window resize
window.addEventListener('resize', handleResponsiveSidebar);
// Section navigation (shows different modules)
document.querySelectorAll('[data-section]').forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
const section = this.getAttribute('data-section');
// Update page title and header based on section
document.querySelector('h1').textContent =
section.charAt(0).toUpperCase() + section.slice(1) + (section === 'reports' ? '' : ' Management');
// Load specific module content
switch(section) {
case 'invoices':
document.getElementById('invoiceModal').classList.remove('hidden');
break;
case 'reports':
// Load reports content
const reportsContent = `
<div class="bg-white p-6 rounded-lg shadow">
<h2 class="text-xl font-semibold mb-4">Financial Reports</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="bg-gray-50 p-4 rounded">
<div class="flex justify-between items-center mb-2">
<h3 class="font-medium">Profit & Loss</h3>
<button class="text-blue-600 hover:text-blue-800">Export</button>
</div>
<div class="chart-container">
<div class="bg-gray-200 rounded h-48 flex items-center justify-center">
Profit & Loss Chart
</div>
</div>
</div>
<div class="bg-gray-50 p-4 rounded">
<div class="flex justify-between items-center mb-2">
<h3 class="font-medium">Expense Analysis</h3>
<button class="text-blue-600 hover:text-blue-800">Export</button>
</div>
<div class="chart-container">
<div class="bg-gray-200 rounded h-48 flex items-center justify-center">
Expense Chart
</div>
</div>
</div>
</div>
</div>`;
document.querySelector('main').innerHTML = reportsContent;
break;
case 'procurement':
// Load procurement content
const procurementContent = `
<div class="bg-white p-6 rounded-lg shadow">
<h2 class="text-xl font-semibold mb-4">Procurement Dashboard</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
<div class="bg-blue-50 p-4 rounded-lg">
<div class="flex items-center">
<i class="fas fa-shipping-fast text-blue-600 text-2xl mr-3"></i>
<div>
<p class="text-gray-600">Pending Orders</p>
<h3 class="text-xl font-bold">24</h3>
</div>
</div>
</div>
<div class="bg-green-50 p-4 rounded-lg">
<div class="flex items-center">
<i class="fas fa-check-circle text-green-600 text-2xl mr-3"></i>
<div>
<p class="text-gray-600">Completed Today</p>
<h3 class="text-xl font-bold">8</h3>
</div>
</div>
</div>
<div class="bg-yellow-50 p-4 rounded-lg">
<div class="flex items-center">
<i class="fas fa-exclamation-triangle text-yellow-600 text-2xl mr-3"></i>
<div>
<p class="text-gray-600">Delayed Shipments</p>
<h3 class="text-xl font-bold">3</h3>
</div>
</div>
</div>
</div>
<div class="overflow-x-auto">
<table class="min-w-full bg-white">
<thead class="bg-gray-100">
<tr>
<th class="py-2 px-4 text-left">PO Number</th>
<th class="py-2 px-4 text-left">Supplier</th>
<th class="py-2 px-4 text-left">Items</th>
<th class="py-2 px-4 text-left">Status</th>
<th class="py-2 px-4 text-left">ETA</th>
</tr>
</thead>
<tbody>
<tr class="border-b hover:bg-gray-50">
<td class="py-2 px-4">PO-2023-105</td>
<td class="py-2 px-4">Builders Supply Co.</td>
<td class="py-2 px-4">Steel beams (50), Cement (100 bags)</td>
<td class="py-2 px-4"><span class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs">In Transit</span></td>
<td class="py-2 px-4">2023-07-15</td>
</tr>
<tr class="border-b hover:bg-gray-50">
<td class="py-2 px-4">PO-2023-106</td>
<td class="py-2 px-4">Mining Equipment Ltd</td>
<td class="py-2 px-4">Drill bits (20), Safety gear (30 sets)</td>
<td class="py-2 px-4"><span class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">Delivered</span></td>
<td class="py-2 px-4">2023-07-10</td>
</tr>
</tbody>
</table>
</div>
</div>`;
document.querySelector('main').innerHTML = procurementContent;
break;
case 'assets':
// Load assets content
const assetsContent = `
<div class="bg-white p-6 rounded-lg shadow">
<h2 class="text-xl font-semibold mb-4">Assets Management</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
<div class="bg-purple-50 p-4 rounded-lg">
<div class="flex items-center">
<i class="fas fa-hard-hat text-purple-600 text-2xl mr-3"></i>
<div>
<p class="text-gray-600">Total Assets</p>
<h3 class="text-xl font-bold">142</h3>
</div>
</div>
</div>
<div class="bg-red-50 p-4 rounded-lg">
<div class="flex items-center">
<i class="fas fa-tools text-red-600 text-2xl mr-3"></i>
<div>
<p class="text-gray-600">Under Maintenance</p>
<h3 class="text-xl font-bold">6</h3>
</div>
</div>
</div>
<div class="bg-green-50 p-4 rounded-lg">
<div class="flex items-center">
<i class="fas fa-calendar-check text-green-600 text-2xl mr-3"></i>
<div>
<p class="text-gray-600">Lease Expiring</p>
<h3 class="text-xl font-bold">3</h3>
</div>
</div>
</div>
</div>
<div class="overflow-x-auto">
<table class="min-w-full bg-white">
<thead class="bg-gray-100">
<tr>
<th class="py-2 px-4 text-left">Asset ID</th>
<th class="py-2 px-4 text-left">Description</th>
<th class="py-2 px-4 text-left">Location</th>
<th class="py-2 px-4 text-left">Status</th>
<th class="py-2 px-4 text-left">Value</th>
</tr>
</thead>
<tbody>
<tr class="border-b hover:bg-gray-50">
<td class="py-2 px-4">EXC-102</td>
<td class="py-2 px-4">Excavator (CAT 320)</td>
<td class="py-2 px-4">Mining Site A</td>
<td class="py-2 px-4"><span class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">Operational</span></td>
<td class="py-2 px-4">$120,000</td>
</tr>
<tr class="border-b hover:bg-gray-50">
<td class="py-2 px-4">CRN-045</td>
<td class="py-2 px-4">Crane (50T Capacity)</td>
<td class="py-2 px-4">Construction Site B</td>
<td class="py-2 px-4"><span class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs">Maintenance</span></td>
<td class="py-2 px-4">$85,000</td>
</tr>
</tbody>
</table>
</div>
</div>`;
document.querySelector('main').innerHTML = assetsContent;
break;
default:
// Reset to dashboard for other sections
location.reload();
}
});
});
// Close invoice modal
document.getElementById('closeInvoiceModal').addEventListener('click', function() {
document.getElementById('invoiceModal').classList.add('hidden');
});
// Close modal when clicking outside
document.getElementById('invoiceModal').addEventListener('click', function(e) {
if (e.target === this) {
this.classList.add('hidden');
}
});
</script>
<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=bmolokwane/erp-software" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>