diff --git a/src/app/components/generic-calculator/calculator.component.html b/src/app/components/generic-calculator/calculator.component.html index 1a816d5c87dcf4c891dad500be5c5facd9b989e0..79dec21bc868caa7628a25a8a0e9cf6b3d50cee3 100644 --- a/src/app/components/generic-calculator/calculator.component.html +++ b/src/app/components/generic-calculator/calculator.component.html @@ -213,6 +213,11 @@ {{ uitextExportAllPbResults }} </button> + <button mat-raised-button color="accent" id="generate-backwater-curve" *ngIf="isPAM" + (click)="generateBackwaterInPAM()"> + {{ uitextGenerateBackwaterInPAM }} + </button> + <mat-card-content> <calc-results id="resultsComp" [formulaire]="formulaire" (afterViewChecked)="onCalcResultsViewChecked()"></calc-results> </mat-card-content> diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index 9d5a06dff1a564c2af4d7385e49fcf8b8c425c41..cf9b82d60997a42af03ffc10d6cbbab2b6681141 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -318,6 +318,10 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe return this.intlService.localizeText("INFO_CALCULATOR_RESULTS_EXPORT_ALL_PB_RESULTS"); } + public get uitextGenerateBackwaterInPAM() { + return this.intlService.localizeText("INFO_MACRORUGO_GENERATE_BACKWATER_CURVE"); + } + public get uitextLoadPredefinedEspece(): string { return this.intlService.localizeText("INFO_CALCULATOR_LOAD_PREDEFINED_ESPECE"); } @@ -700,6 +704,11 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe return this.is(CalculatorType.MacroRugoCompound); } + // true if current Nub is MacroRugoCompound + public get isPAM() { + return this.is(CalculatorType.MacroRugo); + } + // true if current Nub is PreBarrage public get isPB() { return this.is(CalculatorType.PreBarrage); @@ -750,7 +759,7 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe return this.is(CalculatorType.SectionParametree); } - // true if current Nub is PAR + // true if current Nub is CourbeRemous public get isRemous() { return this.is(CalculatorType.CourbeRemous); } @@ -1255,6 +1264,9 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe this.router.navigate(["/calculator", f.uid]); } + public generateBackwaterInPAM() { + } + /** * Opens a modal that allows to choose a predefined Espece * and load its values in current Espece module diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index 49d04bcaa7a4dbf5e72870eb669396dbf985576c..99760ce8b52800c782dcaadd77201db5f55a2672 100755 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -428,6 +428,7 @@ "INFO_MACRORUGO_DESCRIPTION": "natural block", "INFO_MACRORUGO_TITRE_COURT": "Rock-ramp", "INFO_MACRORUGO_TITRE": "Rock-ramp fishpasses", + "INFO_MACRORUGO_GENERATE_BACKWATER_CURVE":"Generate backwater curve", "INFO_MENU_DIAGRAM_TITLE": "Modules diagram", "INFO_MACRORUGOCOMPOUND_TITRE": "Compound rock-ramp fishpasses", "INFO_MACRORUGOCOMPOUND_DESCRIPTION": "natural multiple inclined block aprons", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 764dfbbbf7eb42a5a05132f83ce0c5025c4123f2..5166d6b76e7e25d4a79cfee3810331b7717f987c 100755 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -429,6 +429,7 @@ "INFO_MACRORUGO_DESCRIPTION": "poisson naturelle bloc", "INFO_MACRORUGO_TITRE_COURT": "Macro-rugo.", "INFO_MACRORUGO_TITRE": "Passe à macro-rugosités", + "INFO_MACRORUGO_GENERATE_BACKWATER_CURVE": "Générer une courbe de remous", "INFO_MENU_DIAGRAM_TITLE": "Diagramme des modules", "INFO_MACRORUGOCOMPOUND_TITRE": "Passe à macro-rugosités complexe", "INFO_MACRORUGOCOMPOUND_DESCRIPTION": "poisson naturelle bloc radiers multiples incliné", @@ -774,4 +775,4 @@ "ERROR_VERIF_PAB_WALL_NOT_CROSSABLE": "La cloison n°%N% n'est pas franchissable", "ERROR_VERIF_PAB_DW_NOT_CROSSABLE": "La cloison aval n'est pas franchissable", "WARNING_VERIF_PAR_SPECIES_GROUP": "Les groupes d'espèces 3a, 3b et 7b sont déconseillés pour ce type de passe" -} +} \ No newline at end of file