Commit acded07c authored by Elouan Le Bars's avatar Elouan Le Bars
Browse files

[REF] result detailled view headers names

parent bc6bfc9c
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<script> <script>
import ResultsChart from "./ResultsChart.js"; import ResultsChart from "./ResultsChart.js";
import store from "../store/MainStore.js"; import store from "../store/MainStore.js";
import { sections_comparatif } from "../options/options.js";
import { detailled_results_text } from "../options/detailled_results_text.js"; import { detailled_results_text } from "../options/detailled_results_text.js";
//register custom tooltip positioner for chart //register custom tooltip positioner for chart
...@@ -86,12 +87,8 @@ export default { ...@@ -86,12 +87,8 @@ export default {
return (sphere) => store.state.impact_on_spheres_detailled[sphere]; return (sphere) => store.state.impact_on_spheres_detailled[sphere];
}, },
title: function () { title: function () {
//TODO: clean this function (code redundancy) if (this.selectedView) {
switch(this.selectedView) { return sections_comparatif.find(el => el.name == this.selectedView).title;
case "HUMAN_HEALTH": return "Impact sur la santé humaine"
case "ECOSYSTEM_QUALITY": return "Impact sur la qualité des écosystèmes"
case "CLIMATE_CHANGE": return "Impact sur le changement climatique"
case "RESOURCES": return "Impact sur les ressources"
} }
}, },
detailled_results_text: function () { detailled_results_text: function () {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment