From 5fed209aaf4eb15493815ee9a5e72fd76c20678c Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Fri, 30 Aug 2019 11:39:15 +0200 Subject: [PATCH] MacrorugoCompound: added total flow result line --- .../macrorugo-compound-results-table.component.ts | 10 +++++++++- src/locale/messages.en.json | 1 + src/locale/messages.fr.json | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.ts b/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.ts index 8352c1fa5..5f3e09781 100644 --- a/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.ts +++ b/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.ts @@ -56,7 +56,7 @@ export class MacrorugoCompoundResultsTableComponent extends ResultsComponent { // refresh headers here if language changed this._headers = pr.headers; - // lines 1 - n-1 + // lines 1 - n-1 (aprons) for (let i = 0; i < pr.childrenResults.length; i++) { // @TODO protect loop contents with if(vCalc) ? Will hide erroneous apron results.. const res = pr.childrenResults[i].resultElements[vi].values; @@ -99,6 +99,14 @@ export class MacrorugoCompoundResultsTableComponent extends ResultsComponent { res.xCenter.toFixed(nDigits) ]); } + + // line n (total flow) + this._dataSet.push([ + this.intlService.localizeText("INFO_LIB_TOTAL"), + "", "", + pr.result.resultElements[vi].vCalc.toFixed(nDigits), + "", "", "", "", "", "", "", "", "" + ]); } } diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index 6be90e4e7..3305a7ddc 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -230,6 +230,7 @@ "INFO_LIB_STRUCT_CONTAINER": "Devices", "INFO_LIB_TAU0": "Tractive force", "INFO_LIB_TOR": "Supercritical water line", + "INFO_LIB_TOTAL": "Total", "INFO_LIB_V_GUIDETECH": "Technical guide speed", "INFO_LIB_V": "Average speed", "INFO_LIB_VDEB": "Conveyance speed", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index ba9202669..5f94ea7ac 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -229,6 +229,7 @@ "INFO_LIB_STRUCT_CONTAINER": "Ouvrages", "INFO_LIB_TAU0": "Force tractrice", "INFO_LIB_TOR": "Ligne d'eau torrentielle", + "INFO_LIB_TOTAL": "Total", "INFO_LIB_V_GUIDETECH": "Vitesse Guide technique", "INFO_LIB_V": "Vitesse moyenne", "INFO_LIB_VDEB": "Vitesse débitante", -- GitLab