Display Initial Value of ProductStates in their Visualizer
All checks were successful
E2E Testing / test (push) Successful in 1m29s
All checks were successful
E2E Testing / test (push) Successful in 1m29s
This commit is contained in:
parent
f69d105164
commit
8f5d366dd9
@ -1,7 +1,12 @@
|
||||
<table mat-table [dataSource]="datasource" class="mat-elevation-z8">
|
||||
<ng-container *ngFor="let col of displayedColumns; let i = index" [matColumnDef]="col">
|
||||
<th mat-header-cell *matHeaderCellDef>{{col}}</th>
|
||||
<td mat-cell *matCellDef="let state">{{getStateLabel(state, i)}}</td>
|
||||
<td mat-cell *matCellDef="let state">
|
||||
<span *ngIf="i < displayedColumns.length-1">{{getStateLabel(state, i)}}</span>
|
||||
<mat-icon *ngIf="i == displayedColumns.length-1">
|
||||
{{state.initial? 'done':'close'}}
|
||||
</mat-icon>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
|
@ -1,3 +1,7 @@
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mat-column-Initial {
|
||||
width: 32px;
|
||||
}
|
||||
|
@ -13,8 +13,9 @@ import {
|
||||
} from "@angular/material/table";
|
||||
import {SimpleState} from "../../../../game-model/gamesystems/SimpleState";
|
||||
import {State} from "../../../../game-model/gamesystems/State";
|
||||
import {NgForOf} from "@angular/common";
|
||||
import {NgForOf, NgIf} from "@angular/common";
|
||||
import {ProductState} from "../../../../game-model/gamesystems/ProductState";
|
||||
import {MatIcon} from "@angular/material/icon";
|
||||
|
||||
@Component({
|
||||
selector: 'app-product-state-editor',
|
||||
@ -30,7 +31,9 @@ import {ProductState} from "../../../../game-model/gamesystems/ProductState";
|
||||
MatHeaderCellDef,
|
||||
MatCell,
|
||||
MatCellDef,
|
||||
NgForOf
|
||||
NgForOf,
|
||||
NgIf,
|
||||
MatIcon
|
||||
],
|
||||
templateUrl: './product-state-editor.component.html',
|
||||
styleUrl: './product-state-editor.component.scss'
|
||||
@ -45,6 +48,7 @@ export class ProductStateEditorComponent implements OnInit{
|
||||
ngOnInit() {
|
||||
this.gamesystem!.generateFromChildsystems();
|
||||
this.generateColumnNamesRecursively(this.gamesystem!, "");
|
||||
this.displayedColumns.push('Initial');
|
||||
this.datasource.data = this.gamesystem!.states;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user