Ultronprime commited on
Commit
4971bca
·
verified ·
1 Parent(s): eb47f00

Create config.js

Browse files
Files changed (1) hide show
  1. config.js +41 -0
config.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // =================================================================
2
+ // FACTORY CONFIGURATION FILE
3
+ // =================================================================
4
+ // Edit the data in this file to configure the application.
5
+ // No need to touch app.js for material or product changes.
6
+ // =================================================================
7
+
8
+ /**
9
+ * Defines all raw materials available in the factory.
10
+ * - name: The unique name of the material.
11
+ * - unit: The measurement unit (e.g., 'meters', 'units').
12
+ * - maxStock: The maximum holding capacity for this material.
13
+ * - currentStock: The starting stock level. This will be updated by the app.
14
+ */
15
+ export const MATERIALS_CONFIG = [
16
+ { name: "5mm Copper Wire", unit: "meters", maxStock: 500, currentStock: 500 },
17
+ { name: "RG-58 Coaxial Cable", unit: "meters", maxStock: 200, currentStock: 200 },
18
+ { name: "N-Type Connector", unit: "units", maxStock: 1000, currentStock: 1000 },
19
+ { name: "Plastic Insulator", unit: "units", maxStock: 4000, currentStock: 4000 },
20
+ ];
21
+
22
+ /**
23
+ * Defines the "Bill of Materials" (BOM) or recipe for each product.
24
+ * The key is the product name (must match the one in index.html).
25
+ * The value is an object where keys are material names (from MATERIALS_CONFIG)
26
+ * and values are the quantity of that material required for ONE unit of the product.
27
+ */
28
+ export const RECIPES_CONFIG = {
29
+ "Yagi-Uda Model 5": {
30
+ "5mm Copper Wire": 10,
31
+ "RG-58 Coaxial Cable": 5,
32
+ "N-Type Connector": 1,
33
+ "Plastic Insulator": 8,
34
+ },
35
+ "Basic Dipole Antenna": {
36
+ "5mm Copper Wire": 5,
37
+ "RG-58 Coaxial Cable": 2,
38
+ "N-Type Connector": 1,
39
+ "Plastic Insulator": 2,
40
+ }
41
+ };