diff --git a/src/app/components/calculator-list/calculator-list.component.html b/src/app/components/calculator-list/calculator-list.component.html index 925ebed1196278810f8b7be0598805d63c2730b2..25c88f0250120f157df3e2ea882db154a79ebfe2 100644 --- a/src/app/components/calculator-list/calculator-list.component.html +++ b/src/app/components/calculator-list/calculator-list.component.html @@ -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> diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts index aef92e3e136016e8bc40b94cc47ae1f8ee66c474..4a084aa81a7fe2c3b0b96d48a04cb393cd6e75a6 100644 --- a/src/app/components/calculator-list/calculator-list.component.ts +++ b/src/app/components/calculator-list/calculator-list.component.ts @@ -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 }); } }