mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-05 23:38:52 -06:00
Web: Fix parsing of disposal limit
This commit is contained in:
@@ -235,7 +235,7 @@ const InputPage = () => {
|
||||
"disposal limit (tonne)",
|
||||
].forEach((key) => {
|
||||
newData.plants[plantName][key] = { ...newData.plants[plantName][key] };
|
||||
newData.plants[plantName][key][productName] = 0;
|
||||
newData.plants[plantName][key][productName] = "0";
|
||||
});
|
||||
save(newData);
|
||||
return newData;
|
||||
|
||||
@@ -277,7 +277,7 @@ export const exportPlant = (original, parameters) => {
|
||||
const v = exportValueAcf(dispCost, origDict);
|
||||
if (v) {
|
||||
resDict.disposal[dispName] = { "cost ($/tonne)": v };
|
||||
const limit = original["disposal limit (tonne)"][dispName];
|
||||
const limit = String(original["disposal limit (tonne)"][dispName]);
|
||||
if (limit.length > 0) {
|
||||
resDict.disposal[dispName]["limit (tonne)"] = exportValue(
|
||||
limit,
|
||||
|
||||
@@ -213,7 +213,7 @@ const samplePlantsOriginal = [
|
||||
},
|
||||
"disposal limit (tonne)": {
|
||||
"Hydrogen gas": "10",
|
||||
"Carbon dioxide": "",
|
||||
"Carbon dioxide": 0,
|
||||
Tar: "",
|
||||
},
|
||||
"emissions (tonne/tonne)": {
|
||||
@@ -406,6 +406,7 @@ const samplePlantsExported = [
|
||||
},
|
||||
"Carbon dioxide": {
|
||||
"cost ($/tonne)": [0, 0, 0],
|
||||
"limit (tonne)": [0, 0, 0],
|
||||
},
|
||||
Tar: {
|
||||
"cost ($/tonne)": [200, 400, 800],
|
||||
@@ -439,6 +440,7 @@ const samplePlantsExported = [
|
||||
},
|
||||
"Carbon dioxide": {
|
||||
"cost ($/tonne)": [0, 0, 0],
|
||||
"limit (tonne)": [0, 0, 0],
|
||||
},
|
||||
Tar: {
|
||||
"cost ($/tonne)": [100, 200.0, 400],
|
||||
|
||||
Reference in New Issue
Block a user