diff --git a/electron/ui/src/components/InputWrapper/InputWrapper.js b/electron/ui/src/components/InputWrapper/InputWrapper.js index 028190fc59..d0e46c70f9 100644 --- a/electron/ui/src/components/InputWrapper/InputWrapper.js +++ b/electron/ui/src/components/InputWrapper/InputWrapper.js @@ -31,7 +31,7 @@ export default function InputWrapper(props) { // replace USD currency with simple '$' u = u.replace(/USD_[^/]*/, "$") u = u.replace(/USD/, "$") - console.log("displayUnits:", u) + //console.log("displayUnits:", u) return {__html: u} } diff --git a/electron/ui/src/views/FlowsheetConfig/ConfigInput/ConfigInput.js b/electron/ui/src/views/FlowsheetConfig/ConfigInput/ConfigInput.js index c4ad5dc91d..abc4675390 100644 --- a/electron/ui/src/views/FlowsheetConfig/ConfigInput/ConfigInput.js +++ b/electron/ui/src/views/FlowsheetConfig/ConfigInput/ConfigInput.js @@ -120,9 +120,35 @@ export default function ConfigInput(props) { console.debug("calling extractVariables with root block:", flowsheetData.blocks.fs) let variables = extractVariables(flowsheetData.blocks.fs) let var_sections = organizeVariables(variables) - console.debug("var_sections:", var_sections) + console.log("var_sections:", var_sections); + + //sort sections, put treatment and feed first + let sortedSectionKeys = []; + console.log("1sortedSectionKeys::",sortedSectionKeys); + for(let key of Object.keys(var_sections)) + { + if(key.toLowerCase() === "feed") + { + sortedSectionKeys.unshift(key) + } + } + for(let key of Object.keys(var_sections)) + { + if(key.toLowerCase() === "treatment specification") + { + sortedSectionKeys.unshift(key) + } + } + for(let key of Object.keys(var_sections)) + { + if(key.toLowerCase() !== "feed" && key.toLowerCase() !== "treatment specification") + { + sortedSectionKeys.push(key) + } + } + console.log("2sortedSectionKeys::",sortedSectionKeys); // let sectionBlocks = flowsheetData.blocks.fs.blocks - return Object.keys(var_sections).map((key)=>{ + return sortedSectionKeys.map((key)=>{ let _key = key + Math.floor(Math.random() * 100001); return ( @@ -160,13 +186,15 @@ export default function ConfigInput(props) { - { + { /* Object.keys(costingBlocks).map((key)=>) + */ } - { + { /* Object.keys(parametersBlocks).map((key)=>) + */ } diff --git a/electron/ui/src/views/FlowsheetConfig/FlowsheetConfig.js b/electron/ui/src/views/FlowsheetConfig/FlowsheetConfig.js index 9fa604388a..ba1d435136 100644 --- a/electron/ui/src/views/FlowsheetConfig/FlowsheetConfig.js +++ b/electron/ui/src/views/FlowsheetConfig/FlowsheetConfig.js @@ -160,7 +160,7 @@ export default function FlowsheetConfig() { - +