Skip to content
Snippets Groups Projects
Commit 4229699c authored by mathias.chouet's avatar mathias.chouet
Browse files

PreBarrage: show selected item in results panel title

parent 982436c9
No related branches found
No related tags found
No related merge requests found
Pipeline #138411 passed
......@@ -20,6 +20,7 @@ import {
ParSimulationParams,
ParSimulation,
PreBarrage,
PbCloison,
Espece,
VariatedDetails
} from "jalhyd";
......@@ -53,6 +54,7 @@ import { FormulairePrebarrage } from "../../formulaire/definition/form-prebarrag
import { HotkeysService, Hotkey } from "angular2-hotkeys";
import { MatomoTracker } from "ngx-matomo";
import { sprintf } from 'sprintf-js';
@Component({
selector: "hydrocalc",
......@@ -229,7 +231,20 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
}
public get uitextResultsTitle() {
return this.intlService.localizeText("INFO_CALCULATOR_RESULTS_TITLE");
let title = this.intlService.localizeText("INFO_CALCULATOR_RESULTS_TITLE");
if (this.isPB) {
const selectedItem = (this._formulaire as FormulairePrebarrage).selectedItem;
if (selectedItem instanceof PbCloison) {
// suffix with wall name
title = sprintf(
this.intlService.localizeText("INFO_CALCULATOR_RESULTS_TITLE_PB_WALL"),
this.intlService.localizeMessage(selectedItem.description)
);
} else {
title = this.intlService.localizeText("INFO_CALCULATOR_RESULTS_TITLE_PB_BASINS");
}
}
return title;
}
public get uitextGeneratePAB() {
......
......@@ -90,6 +90,8 @@
"INFO_CALCULATOR_RESULTS_GENERATE_SP_AMONT": "Hydraulic details of upstream section",
"INFO_CALCULATOR_RESULTS_GENERATE_SP_AVAL": "Hydraulic details of downstream section",
"INFO_CALCULATOR_RESULTS_TITLE": "Results",
"INFO_CALCULATOR_RESULTS_TITLE_PB_BASINS": "Basins results",
"INFO_CALCULATOR_RESULTS_TITLE_PB_WALL": "Résults for %s",
"INFO_CALCULATOR_SAVE": "Save",
"INFO_CALCULATOR_USED_BY": "Used by",
"INFO_CALCULATOR_VALEURS": "Values",
......
......@@ -90,6 +90,8 @@
"INFO_CALCULATOR_RESULTS_GENERATE_SP_AMONT": "Détails hydrauliques de la section amont",
"INFO_CALCULATOR_RESULTS_GENERATE_SP_AVAL": "Détails hydrauliques de la section aval",
"INFO_CALCULATOR_RESULTS_TITLE": "Résultats",
"INFO_CALCULATOR_RESULTS_TITLE_PB_BASINS": "Résultats des bassins",
"INFO_CALCULATOR_RESULTS_TITLE_PB_WALL": "Résultats de %s",
"INFO_CALCULATOR_SAVE": "Enregistrer",
"INFO_CALCULATOR_USED_BY": "Utilisé par",
"INFO_CALCULATOR_VALEURS": "Valeurs",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment