From bb93fe4079c5d14a405ac9f400631913b70f371c Mon Sep 17 00:00:00 2001 From: Moises Sacal Date: Mon, 27 Nov 2023 16:10:05 +1100 Subject: [PATCH] updated units --- package-lock.json | 4 +-- package.json | 2 +- src/components/ResultsTable.vue | 52 ++++++++++++++++++++------------- src/export.service.js | 18 ++++++++++++ 4 files changed, 52 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5d362b1..873d309 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "socrates-web", - "version": "1.0.5", + "version": "1.0.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "socrates-web", - "version": "1.0.5", + "version": "1.0.6", "dependencies": { "chart.js": "^4.3.0", "element-plus": "^2.3.5", diff --git a/package.json b/package.json index 9c779ff..694f206 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "socrates-web", "private": true, - "version": "1.0.5", + "version": "1.0.6", "type": "module", "homepage": "https://soil-and-land.github.io/socrates-web/", "scripts": { diff --git a/src/components/ResultsTable.vue b/src/components/ResultsTable.vue index bd2a1ff..f366f1a 100644 --- a/src/components/ResultsTable.vue +++ b/src/components/ResultsTable.vue @@ -38,38 +38,48 @@ const data = computed(() => { - - + + + + + + - + + + + + + + - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + -
diff --git a/src/export.service.js b/src/export.service.js index 2f1de5c..50f5f01 100644 --- a/src/export.service.js +++ b/src/export.service.js @@ -1,6 +1,24 @@ import * as converter from 'json-2-csv'; export async function toCSV({results, initialOC}) { const data = []; + data.push({ + year: '', + crop: '', + rain: 'mm', + yields: 'kg DM/ha', + biomass: 'kg C/ha', + nitrogen: 'kg N/ha', + urine: 'kg N/ha', + oc: '%', + co2: 'kg CO2e/ha', + n2o_fert: 'kg CO2e/ha', + n2o_min: 'kg CO2e/ha', + n2o_res: 'kg CO2e/ha', + n2o_indirect: 'kg CO2e/ha', + n2o_urine: 'kg CO2e/ha', + ch4_animal: 'kg CO2e/ha', + total: 'kg CO2e/ha', + }); data.push({ year: results.years[0] - 1, crop: '',