-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
112 lines (107 loc) · 4.78 KB
/
index.html
File metadata and controls
112 lines (107 loc) · 4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Inventory Manager</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<div class="header">
<h1>Supermarket Inventory Manager</h1>
<div class="stats">
<div class="stat-item">
<strong id="totalProducts">0</strong> Products
</div>
<div class="stat-item">
$<strong id="totalValue">0.00</strong> Total Value
</div>
<div class="stat-item">
<strong id="lowStockCount">0</strong> Low Stock
</div>
</div>
</div>
<div class="controls">
<div class="search-box">
<input type="text" id="searchInput" placeholder="🔍 Search products...">
</div>
<button class="btn btn-success" onclick="showAddProductModal()">+ Add Product</button>
<button class="btn btn-danger" onclick="showLowStock()">- Low Stock</button>
<button class="btn btn-warning" onclick="showStatistics()">Statistics</button>
<button class="btn btn-info" onclick="viewOrders()">Orders</button>
<button class="btn btn-secondary" onclick="viewAllProducts()">Refresh</button>
</div>
<div class="content">
<div class="table-container">
<table id="productsTable">
<thead>
<tr>
<th class="sortable" onclick="sortTable('id')">ID</th>
<th class="sortable" onclick="sortTable('name')">Name</th>
<th class="sortable" onclick="sortTable('category')">Category</th>
<th class="sortable" onclick="sortTable('price')">Price</th>
<th class="sortable" onclick="sortTable('quantity')">Quantity</th>
<th>Reorder Level</th>
<th>Status</th>
</tr>
</thead>
<tbody id="tableBody">
</tbody>
</table>
</div>
</div>
</div>
<!-- Add/Edit Product Modal -->
<div class="modal" id="productModal">
<div class="modal-content">
<div class="modal-header">
<h2 id="modalTitle">Add Product</h2>
</div>
<form id="productForm">
<div class="form-group">
<label>Product ID *</label>
<input type="text" id="productId" required>
</div>
<div class="form-group">
<label>Name *</label>
<input type="text" id="productName" required>
</div>
<div class="form-group">
<label>Category *</label>
<input type="text" id="productCategory" required>
</div>
<div class="form-group">
<label>Price *</label>
<input type="number" id="productPrice" step="0.01" min="0" required>
</div>
<div class="form-group">
<label>Quantity *</label>
<input type="number" id="productQuantity" min="0" required>
</div>
<div class="form-group">
<label>Reorder Level *</label>
<input type="number" id="productReorder" min="0" required>
</div>
<div class="form-group">
<label>Supplier ID</label>
<input type="text" id="productSupplier" value="S001">
</div>
<div class="modal-actions">
<button type="button" class="btn btn-secondary" onclick="closeModal()">Cancel</button>
<button type="submit" class="btn btn-success">Save</button>
</div>
</form>
</div>
</div>
<!-- Context Menu -->
<div class="context-menu" id="contextMenu">
<div class="context-menu-item" onclick="viewProductDetails()">👁️ View Details</div>
<div class="context-menu-item" onclick="editProduct()">✏️ Edit Product</div>
<div class="context-menu-item" onclick="updateStock()">📦 Update Stock</div>
<div class="context-menu-separator"></div>
<div class="context-menu-item" onclick="deleteProduct()">🗑️ Delete Product</div>
</div>
<script src="script.js"></script>
</body>
</html>