Mark Gamesystem as unsaved after state change
Some checks failed
E2E Testing / test (push) Failing after 1m21s
Some checks failed
E2E Testing / test (push) Failing after 1m21s
This commit is contained in:
parent
4dbed5a855
commit
0f82b6edac
@ -4,7 +4,7 @@
|
|||||||
<td mat-cell *matCellDef="let state">
|
<td mat-cell *matCellDef="let state">
|
||||||
<span *ngIf="editedElement !== state"> {{state.stateLabel}}</span>
|
<span *ngIf="editedElement !== state"> {{state.stateLabel}}</span>
|
||||||
<mat-form-field appearance="fill" class="long-form" *ngIf="editedElement === state">
|
<mat-form-field appearance="fill" class="long-form" *ngIf="editedElement === state">
|
||||||
<input matInput [(ngModel)]="state.stateLabel" (ngModelChange)="isEditedStateValid()">
|
<input matInput [(ngModel)]="state.stateLabel" (ngModelChange)="onStateChange()">
|
||||||
<mat-hint class="mat-error" *ngIf="editedStateLabelError"><mat-icon class="warning-icon">warning</mat-icon>Missing State-Label Information</mat-hint>
|
<mat-hint class="mat-error" *ngIf="editedStateLabelError"><mat-icon class="warning-icon">warning</mat-icon>Missing State-Label Information</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</td>
|
</td>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<p *ngIf="editedElement !== element">{{element.stateDescription}}</p>
|
<p *ngIf="editedElement !== element">{{element.stateDescription}}</p>
|
||||||
<mat-form-field appearance="fill" class="long-form" *ngIf="element === editedElement">
|
<mat-form-field appearance="fill" class="long-form" *ngIf="element === editedElement">
|
||||||
<mat-label>Description</mat-label>
|
<mat-label>Description</mat-label>
|
||||||
<textarea matInput [(ngModel)]="element.stateDescription" rows="3"></textarea>
|
<textarea matInput [(ngModel)]="element.stateDescription" rows="3" (ngModelChange)="onStateChange()"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<mat-icon *ngIf="state.initial">done</mat-icon>
|
<mat-icon *ngIf="state.initial">done</mat-icon>
|
||||||
<mat-icon *ngIf="!state.initial">close</mat-icon>
|
<mat-icon *ngIf="!state.initial">close</mat-icon>
|
||||||
</div>
|
</div>
|
||||||
<mat-checkbox *ngIf="editedElement === state" [(ngModel)]="state.initial"></mat-checkbox>
|
<mat-checkbox *ngIf="editedElement === state" [(ngModel)]="state.initial" (ngModelChange)="onStateChange()"></mat-checkbox>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -76,7 +76,11 @@ export class SimpleStateEditorComponent implements OnInit{
|
|||||||
this.dataSource.data = this.gamesystem.states;
|
this.dataSource.data = this.gamesystem.states;
|
||||||
this.editedElement = simpleState;
|
this.editedElement = simpleState;
|
||||||
this.expandedElement = simpleState;
|
this.expandedElement = simpleState;
|
||||||
|
this.onStateChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onStateChange() {
|
||||||
|
this.gamesystem!.onModifyContent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user