Skip to content

Commit

Permalink
update subcategories upon scenario change; update subcategories for o…
Browse files Browse the repository at this point in the history
…perational model
  • Loading branch information
MichaelPesce committed Oct 21, 2024
1 parent d2e7145 commit 3647c28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
19 changes: 4 additions & 15 deletions electron/ui/src/assets/Subcategories.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,13 @@
},
"operational": {
"Dynamic": [
"CompletionsDemand","DisposalOperationalCost","TreatmentOperationalCost","CompletionsPadOutsideSystem",
"DesalinationTechnologies","DesalinationSites","TruckingTime","PadRates","FlowbackRates","NodeCapacities",
"InitialPipelineCapacity","InitialPipelineDiameters", "InitialDisposalCapacity","InitialTreatmentCapacity","ExtWaterSourcingAvailability",
"CompletionsDemand","DisposalOperationalCost","TruckingTime","PadRates","FlowbackRates","ExtWaterSourcingAvailability",
"PadOffloadingCapacity","CompletionsPadStorage","ReuseOperationalCost","PipelineOperationalCost",
"ExternalSourcingCost","TruckingHourlyCost","PipelineDiameterValues","DisposalCapacityIncrements",
"InitialStorageCapacity","StorageCapacityIncrements","TreatmentCapacityIncrements","TreatmentEfficiency",
"DisposalExpansionCost","StorageExpansionCost","TreatmentExpansionCost","PipelineCapexDistanceBased",
"PipelineCapexCapacityBased","PipelineCapacityIncrements","PipelineExpansionDistance","WellPressure", "Hydraulics","Elevation",
"Economics","PadWaterQuality","StorageInitialWaterQuality","PadStorageInitialWaterQuality","DisposalOperatingCapacity", "RemovalEfficiency",
"ReuseCapacity", "ReuseMinimum", "BeneficialReuseCost", "BeneficialReuseCredit", "TreatmentExpansionLeadTime", "DisposalExpansionLeadTime",
"StorageExpansionLeadTime", "PipelineExpansionLeadTime_Dist", "PipelineExpansionLeadTime_Capac", "ExternalWaterQuality", "SWDDeep",
"SWDAveragePressure", "SWDProxPAWell", "SWDProxInactiveWell", "SWDProxEQ", "SWDProxFault", "SWDProxHpOrLpWell", "SWDRiskFactors",
"AirEmissionCoefficients", "TreatmentEmissionCoefficients", "DesalinationSurrogate"
"ExternalSourcingCost","TruckingHourlyCost","TreatmentEfficiency","PadWaterQuality","ExternalWaterQuality",
"TankFlowbackRates", "ProductionRates", "DisposalCapacity", "PadOffloadingCapacity", "PadStorageCost"
],
"Static": [
"PNA", "CNA", "CCA", "NNA", "NCA", "NKA", "NRA", "NSA", "FCA", "RCA", "RNA", "RSA",
"SCA", "SNA", "ROA", "RKA", "SOA", "NOA", "PCT", "PKT", "FCT", "CST", "CCT", "CKT",
"RST", "ROT", "SOT", "RKT"
"FCA", "RCA", "PCT", "PKT", "FCT", "CCT", "CKT", "PAL"
]
}
}
Expand Down
6 changes: 5 additions & 1 deletion electron/ui/src/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function Sidebar(props) {
const [ openStatic, setOpenStatic ] = useState(false)
const [ openResultsTables, setOpenResultsTables ] = useState(false)
const [ overrideList, setOverrideList ] = useState([])
const Subcategories = SUBCATEGORIES[modelType || 'strategic']
const [ Subcategories, setSubCategories ] = useState(SUBCATEGORIES[modelType || 'strategic'])

useEffect(() => {
let tempOverrideList = []
Expand All @@ -41,6 +41,10 @@ export default function Sidebar(props) {
}
if (tempOverrideList.length > 0) tempOverrideList.push("Results Tables")
setOverrideList(tempOverrideList)
let newSubCategories = SUBCATEGORIES[modelType || 'strategic']
console.log("setting subcategories to")
console.log(newSubCategories)
setSubCategories(newSubCategories)
},[scenario])

const handleOpenSaveModal = () => setOpenSaveModal(true);
Expand Down

0 comments on commit 3647c28

Please sign in to comment.