Commit 287fe580 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Liste des modules de calcul: les boutons de création portent l'ID du type de module

Showing with 5 additions and 3 deletions
+5 -3
......@@ -24,7 +24,7 @@
<mat-card-actions>
<div class="container" fxLayout="column" fxLayoutAlign="left" fxLayoutGap="10px">
<button mat-raised-button color="accent" *ngFor="let calc of theme.calculators" class="theme-calculator"
(click)="create(calc.type)" [innerHTML]="calc.label"></button>
(click)="create(calc.type)" [innerHTML]="calc.label" [id]="calc.buttonId"></button>
</div>
</mat-card-actions>
......
......@@ -50,7 +50,8 @@ export class CalculatorListComponent implements OnInit {
for (const calcType of theme.calculators) {
item.calculators.push({
type: calcType,
label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(calcType)
label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(calcType),
buttonId: "create-calc-" + calcType
});
// mark as used
const index = unusedCalculators.indexOf(calcType);
......@@ -77,7 +78,8 @@ export class CalculatorListComponent implements OnInit {
if (t !== CalculatorType.Structure) {
unusedTheme.calculators.push({
type: t,
label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(t)
label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(t),
buttonId: "create-calc-" + t
});
}
}
......
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