Skip to content

Commit

Permalink
Update how LCOE UI forms show LCOH groupbox label for IPH models.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbrown75 committed Nov 15, 2024
1 parent 45fd147 commit 1d04881
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 78 deletions.
50 changes: 6 additions & 44 deletions deploy/runtime/ui/Financial LCOE Calc with Costs.json
Original file line number Diff line number Diff line change
Expand Up @@ -955,43 +955,6 @@
}
}
},
"GroupBox": {
"Visible": 1.0,
"ObjectProperties": {
"Name": {
"Type": 5.0,
"String": "lcoh_groupbox"
},
"X": {
"Type": 3.0,
"Integer": 9.0
},
"Y": {
"Type": 3.0,
"Integer": 6.0
},
"Width": {
"Type": 3.0,
"Integer": 850.0
},
"Height": {
"Type": 3.0,
"Integer": 648.0
},
"Tool Tip": {
"Type": 5.0,
"String": ""
},
"Caption": {
"Type": 5.0,
"String": "LCOH Calculator"
},
"Bold": {
"Type": 2.0,
"Boolean": 1.0
}
}
},
"Divider": {
"Visible": 1.0,
"ObjectProperties": {
Expand Down Expand Up @@ -2460,7 +2423,7 @@
"{",
"\tenable_disable();",
"\tcfin_is_zero_check();\r",
"\tshow_lcoe_groupbox();",
"\tset_groupbox_label();",
"};",
"",
"",
Expand All @@ -2472,20 +2435,19 @@
"",
"on_change{'c_construction_cost'} = define() { cfin_is_zero_check(); };",
"\r",
"function show_lcoe_groupbox()\r",
"function set_groupbox_label()\r",
"{\r",
"\ttech = technology();\r",
"\tis_iph = false;\r",
"\tgroupbox_label = 'LCOE Calculator';\r",
"\tif(tech == \"Physical Trough IPH\"\r",
"\t\t|| tech == \"MSPT IPH\"\r",
"\t\t|| tech == \"MSLF IPH\"\r",
"\t\t|| tech == \"DSGL IPH\")\r",
"\t\t{\r",
"\t\t\tis_iph = true;\r",
"\t\t\tgroupbox_label = 'LCOH Calculator';\r",
"\t\t}\r",
"\t\t\r",
"\tshow(\"lcoe_groupbox\", is_iph==false);\r",
"\tshow(\"lcoh_groupbox\", is_iph==true);\r",
"\tproperty('lcoe_groupbox','Caption',groupbox_label);\r",
"\t\r",
"}",
""
]
Expand Down
84 changes: 50 additions & 34 deletions deploy/runtime/ui/Financial LCOE Calculator.json
Original file line number Diff line number Diff line change
Expand Up @@ -1001,49 +1001,36 @@
}
}
},
"Divider": {
"GroupBox": {
"Visible": 1.0,
"ObjectProperties": {
"Name": {
"Type": 5.0,
"String": "object 22"
"String": "lcoe_groupbox"
},
"X": {
"Type": 3.0,
"Integer": 12.0
"Integer": 9.0
},
"Y": {
"Type": 3.0,
"Integer": 561.0
"Integer": 6.0
},
"Width": {
"Type": 3.0,
"Integer": 837.0
"Integer": 850.0
},
"Height": {
"Type": 3.0,
"Integer": 16.0
"Integer": 693.0
},
"Tool Tip": {
"Type": 5.0,
"String": ""
},
"Orientation": {
"Type": 3.0,
"Integer": 0.0
},
"Colour": {
"Type": 4.0,
"Color": {
"Red": 120.0,
"Green": 120.0,
"Blue": 120.0,
"Alpha": 255.0
}
},
"Caption": {
"Type": 5.0,
"String": "Reference Values"
"String": "LCOE Calculator"
},
"Bold": {
"Type": 2.0,
Expand All @@ -1056,15 +1043,15 @@
"ObjectProperties": {
"Name": {
"Type": 5.0,
"String": "object 2211"
"String": "object 22"
},
"X": {
"Type": 3.0,
"Integer": 12.0
},
"Y": {
"Type": 3.0,
"Integer": 258.0
"Integer": 561.0
},
"Width": {
"Type": 3.0,
Expand Down Expand Up @@ -1093,7 +1080,7 @@
},
"Caption": {
"Type": 5.0,
"String": "Financial Assumptions"
"String": "Reference Values"
},
"Bold": {
"Type": 2.0,
Expand All @@ -1106,15 +1093,15 @@
"ObjectProperties": {
"Name": {
"Type": 5.0,
"String": "object 2219"
"String": "object 2211"
},
"X": {
"Type": 3.0,
"Integer": 12.0
},
"Y": {
"Type": 3.0,
"Integer": 96.0
"Integer": 258.0
},
"Width": {
"Type": 3.0,
Expand Down Expand Up @@ -1143,44 +1130,57 @@
},
"Caption": {
"Type": 5.0,
"String": "Capital and Operating Costs"
"String": "Financial Assumptions"
},
"Bold": {
"Type": 2.0,
"Boolean": 1.0
}
}
},
"GroupBox": {
"Divider": {
"Visible": 1.0,
"ObjectProperties": {
"Name": {
"Type": 5.0,
"String": "object 4"
"String": "object 2219"
},
"X": {
"Type": 3.0,
"Integer": 9.0
"Integer": 12.0
},
"Y": {
"Type": 3.0,
"Integer": 6.0
"Integer": 96.0
},
"Width": {
"Type": 3.0,
"Integer": 850.0
"Integer": 837.0
},
"Height": {
"Type": 3.0,
"Integer": 693.0
"Integer": 16.0
},
"Tool Tip": {
"Type": 5.0,
"String": ""
},
"Orientation": {
"Type": 3.0,
"Integer": 0.0
},
"Colour": {
"Type": 4.0,
"Color": {
"Red": 120.0,
"Green": 120.0,
"Blue": 120.0,
"Alpha": 255.0
}
},
"Caption": {
"Type": 5.0,
"String": "LCOE Calculator"
"String": "Capital and Operating Costs"
},
"Bold": {
"Type": 2.0,
Expand Down Expand Up @@ -3081,7 +3081,8 @@
"on_load{\"Financial LCOE Calculator\"} = define()",
"{",
" cfin_is_zero_check();",
" enable_disable();",
" enable_disable();\r",
" set_groupbox_label();",
"};",
"",
"on_change{'ui_cost_input_option'} = define()",
Expand All @@ -3099,6 +3100,21 @@
"{",
"\tcfin_is_zero_check(); ",
"};",
"\r",
"function set_groupbox_label()\r",
"{\r",
"\ttech = technology();\r",
"\tgroupbox_label = 'LCOE Calculator';\r",
"\tif(tech == \"Physical Trough IPH\"\r",
"\t\t|| tech == \"MSPT IPH\"\r",
"\t\t|| tech == \"MSLF IPH\"\r",
"\t\t|| tech == \"DSGL IPH\")\r",
"\t\t{\r",
"\t\t\tgroupbox_label = 'LCOH Calculator';\r",
"\t\t}\r",
"\tproperty('lcoe_groupbox','Caption',groupbox_label);\r",
"\t\r",
"}\r",
"",
"",
""
Expand Down

0 comments on commit 1d04881

Please sign in to comment.