Store conditions and simplify condition reference to component-name
All checks were successful
E2E Testing / test (push) Successful in 1m33s

This commit is contained in:
Sebastian Böckelmann 2024-03-18 16:33:39 +01:00
parent 511043b764
commit e033243389
3 changed files with 38 additions and 3 deletions

View File

@ -37,7 +37,7 @@
<ng-container matColumnDef="edit">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let condition;">
<button mat-icon-button class="icon-btn-primary" *ngIf="editedCondition == undefined" (click)="edit(condition)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button class="icon-btn-primary" *ngIf="editedCondition === undefined" (click)="edit(condition)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button class="icon-btn-primary" *ngIf="editedCondition === condition" (click)="finishEditing()"><mat-icon>done</mat-icon></button>
</td>
</ng-container>

View File

@ -53,6 +53,10 @@ export class StoreProject {
return value.stateLabel
}
if(key === "scriptAccount") {
return value.componentName
}
if(key === 'incomingTransitions' || key === 'outgoingTransitions' || key === 'unsaved' || key === 'type') {
return undefined;
} else {

View File

@ -4,10 +4,41 @@
"states": [
{
"initial": false,
"conditions": [],
"conditions": [
{
"scriptAccount": "Luftfeuchtigkeit",
"minValue": 0,
"maxValue": "50"
}
],
"stateLabel": "Sonnig",
"stateDescription": "Die Sonne scheint"
},
{
"initial": false,
"conditions": [
{
"scriptAccount": "Luftfeuchtigkeit",
"minValue": "50",
"maxValue": "75"
}
],
"stateLabel": "Wolkig",
"stateDescription": ""
}
],
"transitions": []
"transitions": [
{
"scriptAccountActions": [],
"scriptAccountConditions": [
{
"scriptAccount": "Luftfeuchtigkeit",
"minValue": "50",
"maxValue": "75"
}
],
"startingState": "Sonnig",
"endingState": "Wolkig"
}
]
}