Ultronprime commited on
Commit
3fcdf70
·
verified ·
1 Parent(s): 3487375

Update config.js

Browse files
Files changed (1) hide show
  1. config.js +89 -34
config.js CHANGED
@@ -1,43 +1,98 @@
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
- * - costPerUnit: (NEW) The cost of one unit of this material.
15
- * - reorderPoint: (NEW) The stock level at which a re-order is suggested.
16
- */
17
  export const MATERIALS_CONFIG = [
18
- { name: "5mm Copper Wire", unit: "meters", maxStock: 500, currentStock: 500, costPerUnit: 0.75, reorderPoint: 100 },
19
- { name: "RG-58 Coaxial Cable", unit: "meters", maxStock: 200, currentStock: 200, costPerUnit: 1.20, reorderPoint: 40 },
20
- { name: "N-Type Connector", unit: "units", maxStock: 1000, currentStock: 1000, costPerUnit: 2.50, reorderPoint: 150 },
21
- { name: "Plastic Insulator", unit: "units", maxStock: 4000, currentStock: 4000, costPerUnit: 0.15, reorderPoint: 500 },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ];
23
 
24
- /**
25
- * Defines the "Bill of Materials" (BOM) or recipe for each product.
26
- * The key is the product name (must match the one in index.html).
27
- * The value is an object where keys are material names (from MATERIALS_CONFIG)
28
- * and values are the quantity of that material required for ONE unit of the product.
29
- */
30
  export const RECIPES_CONFIG = {
31
- "Yagi-Uda Model 5": {
32
- "5mm Copper Wire": 10,
33
- "RG-58 Coaxial Cable": 5,
34
- "N-Type Connector": 1,
35
- "Plastic Insulator": 8,
36
- },
37
- "Basic Dipole Antenna": {
38
- "5mm Copper Wire": 5,
39
- "RG-58 Coaxial Cable": 2,
40
- "N-Type Connector": 1,
41
- "Plastic Insulator": 2,
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  };
 
1
  // =================================================================
2
+ // FACTORY CONFIGURATION FILE - v2.0
3
  // =================================================================
4
+ // Real-world data model for Win Super Power Antenna factory.
 
5
  // =================================================================
6
 
 
 
 
 
 
 
 
 
 
7
  export const MATERIALS_CONFIG = [
8
+ // Frame Materials
9
+ { name: "5/32 x 3/4 Tube", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
10
+ { name: "1/8 x 1/2 Tube", unit: "pcs", maxStock: 4000, currentStock: 4000, costPerUnit: 0, reorderPoint: 500 },
11
+ { name: "1/8 x 3/4 Tube", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
12
+ { name: "End Knob Round", unit: "pcs", maxStock: 3000, currentStock: 3000, costPerUnit: 0, reorderPoint: 300 },
13
+ { name: "End Knob Square 1/2x1/2", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
14
+ { name: "Dipole (CI Cup)", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
15
+ { name: "U-Clip", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
16
+ { name: "12cm Round Tube 7/8 MF", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
17
+ { name: "15cm Round Tube 5/8 MF", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
18
+ { name: "5/8 x 4 CSK Screw", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
19
+ { name: "3/8 x 4 Screw", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
20
+
21
+ // Wire/Connector Materials
22
+ { name: "16 1/2 Ygr Wire", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
23
+ { name: "F-Connector Male (4005)", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
24
+ { name: "F-Connector Female (2002)", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
25
+
26
+ // Booster Materials
27
+ { name: "Macking Coil", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
28
+ { name: "Coil 28gsm (25cm)", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
29
+ { name: "Coil 26gsm (16cm)", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
30
+ { name: "Coil 25gsm (36cm)", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
31
+ { name: "Resistor 1k", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
32
+ { name: "Resistor 100-ohm", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
33
+ { name: "Resistor 68k", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
34
+ { name: "Resistor 2k", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
35
+ { name: "Resistor 150-R", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
36
+ { name: "Resistor 10k", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
37
+ { name: "LED Multicolour", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
38
+ { name: "LED 5mm", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
39
+ { name: "PF 12", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
40
+ { name: "PF 39", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
41
+ { name: "PF 102 Indian", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
42
+ { name: "PF 102 Normal", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
43
+ { name: "Capacitor 25v 100uF", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
44
+ { name: "Capacitor 25v 220uF", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
45
+ { name: "Transistor (2355)", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 100 },
46
+
47
+ // Power Supply Materials
48
+ { name: "Plastic Box (Power)", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
49
+ { name: "Transformer", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
50
+ { name: "IN4007 Diode", unit: "pcs", maxStock: 1000, currentStock: 1000, costPerUnit: 0, reorderPoint: 200 },
51
+ { name: "5C 2V Wire 3-yard", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
52
+ { name: "4-Antenna Jack", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
53
+ { name: "AC Cord", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
54
+
55
+ // Packing Materials
56
+ { name: "Packing Bag", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
57
+ { name: "Warranty Card", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
58
+ { name: "Round Sticker", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
59
+ { name: "Box Plastic Cover", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 },
60
+ { name: "Box Sticker", unit: "pcs", maxStock: 500, currentStock: 500, costPerUnit: 0, reorderPoint: 50 }
61
  ];
62
 
 
 
 
 
 
 
63
  export const RECIPES_CONFIG = {
64
+ // SUB-ASSEMBLIES
65
+ "Antenna Frame Assembly": {
66
+ "5/32 x 3/4 Tube": 1, "1/8 x 1/2 Tube": 8, "1/8 x 3/4 Tube": 2, "End Knob Round": 6, "End Knob Square 1/2x1/2": 2,
67
+ "Dipole (CI Cup)": 1, "U-Clip": 1, "12cm Round Tube 7/8 MF": 2, "15cm Round Tube 5/8 MF": 1, "5/8 x 4 CSK Screw": 2
68
+ },
69
+ "Booster Assembly": {
70
+ "Macking Coil": 1, "Coil 28gsm (25cm)": 1, "Coil 26gsm (16cm)": 2, "Resistor 1k": 1, "LED Multicolour": 1, "PF 12": 1, "PF 39": 2, "PF 102 Indian": 1, "PF 102 Normal": 2,
71
+ "Resistor 100-ohm": 1, "Resistor 68k": 2, "Resistor 2k": 1, "Resistor 150-R": 1, "Capacitor 25v 100uF": 1, "F-Connector Female (2002)": 1, "Transistor (2355)": 2
72
+ },
73
+ "Power Supply Assembly": {
74
+ "Plastic Box (Power)": 1, "Transformer": 1, "IN4007 Diode": 2, "Coil 25gsm (36cm)": 1, "5C 2V Wire 3-yard": 1, "4-Antenna Jack": 1, "F-Connector Female (2002)": 1,
75
+ "Resistor 10k": 1, "PF 102 Normal": 1, "Capacitor 25v 220uF": 1, "3/8 x 4 Screw": 2, "LED 5mm": 1, "AC Cord": 1
76
+ },
77
+ "Wire Assembly": {
78
+ "16 1/2 Ygr Wire": 1, "F-Connector Male (4005)": 2
79
+ },
80
+ "Packaging Set": {
81
+ "Packing Bag": 1, "Warranty Card": 1, "Round Sticker": 1, "Box Plastic Cover": 1, "Box Sticker": 1
82
+ },
83
+
84
+ // FINAL PRODUCT
85
+ "COMPLETE ANTENNA UNIT": {
86
+ // This recipe consumes the sub-assemblies. The app logic will need to handle this hierarchy.
87
+ // For now, list the raw materials directly. A future enhancement will be to nest recipes.
88
+ "5/32 x 3/4 Tube": 1, "1/8 x 1/2 Tube": 8, "1/8 x 3/4 Tube": 2, "End Knob Round": 6, "End Knob Square 1/2x1/2": 2,
89
+ "Dipole (CI Cup)": 1, "U-Clip": 1, "12cm Round Tube 7/8 MF": 2, "15cm Round Tube 5/8 MF": 1, "5/8 x 4 CSK Screw": 2,
90
+ "Macking Coil": 1, "Coil 28gsm (25cm)": 1, "Coil 26gsm (16cm)": 2, "Resistor 1k": 1, "LED Multicolour": 1, "PF 12": 1, "PF 39": 2, "PF 102 Indian": 1, "PF 102 Normal": 3, // 2 for booster + 1 for power
91
+ "Resistor 100-ohm": 1, "Resistor 68k": 2, "Resistor 2k": 1, "Resistor 150-R": 1, "Capacitor 25v 100uF": 1, "F-Connector Female (2002)": 2, // 1 for booster + 1 for power
92
+ "Transistor (2355)": 2,
93
+ "Plastic Box (Power)": 1, "Transformer": 1, "IN4007 Diode": 2, "Coil 25gsm (36cm)": 1, "5C 2V Wire 3-yard": 1, "4-Antenna Jack": 1,
94
+ "Resistor 10k": 1, "Capacitor 25v 220uF": 1, "3/8 x 4 Screw": 2, "LED 5mm": 1, "AC Cord": 1,
95
+ "16 1/2 Ygr Wire": 1, "F-Connector Male (4005)": 2,
96
+ "Packing Bag": 1, "Warranty Card": 1, "Round Sticker": 1, "Box Plastic Cover": 1, "Box Sticker": 1
97
+ }
98
  };