template-systems #41
@ -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>
 | 
			
		||||
 | 
			
		||||
@ -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")
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user