template-systems #41

Merged
sebastian merged 30 commits from template-systems into main 2024-04-19 21:10:01 +02:00
2 changed files with 19 additions and 2 deletions
Showing only changes of commit 3efa612435 - Show all commits

View File

@ -38,6 +38,21 @@
<mat-card-title>Character-Relations</mat-card-title>
</mat-card-header>
<mat-card-content>
<p *ngFor="let characterRelation of character!.characterRelations">{{characterRelation.firstCharacter.componentName}} - {{characterRelation.secondCharacter.componentName}}</p>
<mat-accordion>
<mat-expansion-panel *ngFor="let characterRelation of character!.characterRelations">
<mat-expansion-panel-header>
<mat-panel-title>{{characterRelation.firstCharacter.componentName}} - {{characterRelation.secondCharacter.componentName}}</mat-panel-title>
</mat-expansion-panel-header>
<p>Templatesystems: {{characterRelation.characterRelationGamesystems.length}}</p>
<mat-accordion>
<mat-expansion-panel *ngFor="let templateSystem of characterRelation.characterRelationGamesystems">
<mat-expansion-panel-header>
<mat-panel-title>{{templateSystem.componentName}}</mat-panel-title>
</mat-expansion-panel-header>
<app-product-gamesystem-editor [gamesystem]="templateSystem" [templateElement]="characterRelation"></app-product-gamesystem-editor>
</mat-expansion-panel>
</mat-accordion>
</mat-expansion-panel>
</mat-accordion>
</mat-card-content>
</mat-card>

View File

@ -18,11 +18,13 @@ export class CharacterRelation implements TemplateElement{
}
addCharacterRelationSystem(gamesystem: Gamesystem<any, any>) {
if((gamesystem instanceof SimpleTemplateGamesystem || gamesystem instanceof ProductTemplateSystem) && this.isGamesystemCharacterRelationSpecific(gamesystem.componentName)) {
if((gamesystem instanceof SimpleTemplateGamesystem || gamesystem instanceof ProductTemplateSystem) && !this.isGamesystemCharacterRelationSpecific(gamesystem.componentName)) {
const templateGamesystem = new ProductTemplateSystem(gamesystem.componentName, gamesystem.componentDescription, TemplateType.CHARACTER_RELATION);
templateGamesystem.addChildGamesystem(gamesystem);
templateGamesystem.addChildGamesystem(gamesystem);
this.characterRelationGamesystems.push(templateGamesystem);
} else {
console.log("Test")
}
}