OpenGamesystemEditor from ProductTransitionEditor
All checks were successful
E2E Testing / test (push) Successful in 1m29s

This commit is contained in:
Sebastian Böckelmann 2024-02-16 17:58:42 +01:00
parent 086cde3873
commit 18bdacb5e9
2 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<table mat-table [dataSource]="dataSource">
<ng-container *ngFor="let col of displayedColumns; let i = index" [matColumnDef]="col.internalName">
<th mat-header-cell *matHeaderCellDef>{{col.displayedName}}</th>
<td mat-cell *matCellDef="let transition" [matTooltip]="getLeafStateByIndex(transition, i).stateDescription">
<th mat-header-cell *matHeaderCellDef (dblclick)="openGamesystemEditor(i)">{{col.displayedName}}</th>
<td mat-cell *matCellDef="let transition" [matTooltip]="getLeafStateByIndex(transition, i).stateDescription" (dblclick)="openGamesystemEditor(i)">
{{getLeafStateByIndex(transition, i).stateLabel}}
</td>
</ng-container>

View File

@ -86,4 +86,12 @@ export class ProductTransitionEditorComponent implements OnInit{
return leafStates[index];
}
openGamesystemEditor(leafIndex: number) {
const leafGamesystems = LeafGamesystemCalculator.calcLeafGeamesystems(this.gamesystem!);
if(leafIndex < this.numberLeafSystems) {
this.onOpenGamesystem.emit(leafGamesystems[leafIndex])
} else {
this.onOpenGamesystem.emit(leafGamesystems[leafIndex - this.numberLeafSystems])
}
}
}