diff --git a/src/app/components/pages/content-carousel-page/content-carousel-page.component.html b/src/app/components/pages/content-carousel-page/content-carousel-page.component.html index e3b5ed9785c4df65ab3dfd7c716245bb872aaec5..4a7655e4d4967ded1442798b1cefc5b451bede4e 100644 --- a/src/app/components/pages/content-carousel-page/content-carousel-page.component.html +++ b/src/app/components/pages/content-carousel-page/content-carousel-page.component.html @@ -1,12 +1,13 @@ <div fxLayout="column" fxLayoutAlign="start" fxLayoutGap="20px" fxFill> <div fxLayout="row" fxLayoutAlign="center"> <mat-tab-group> - <!-- - <mat-tab *ngFor="let content of contents"> - <app-content-choice-participant *ngIf="content.format === ContentType.CHOICE"></app-content-choice-participant> - <app-content-text-participant *ngIf="content.format === ContentType.TEXT"></app-content-text-participant> + + <mat-tab *ngFor="let content of contents" label="{{content.subject}}"> + <app-content-choice-participant *ngIf="content.format === CHOICE"></app-content-choice-participant> + <app-content-text-participant *ngIf="content.format === TEXT"></app-content-text-participant> </mat-tab> - --> + + <!-- <mat-tab label="Text"> <div class="tab-container"> <app-content-text-participant></app-content-text-participant> @@ -26,7 +27,7 @@ <div class="tab-container"> <app-content-choice-participant></app-content-choice-participant> </div> - </mat-tab> + </mat-tab> --> </mat-tab-group> </div> </div> diff --git a/src/app/components/pages/content-carousel-page/content-carousel-page.component.ts b/src/app/components/pages/content-carousel-page/content-carousel-page.component.ts index 3fa5301e9db8a3d256983dd60fe78da30c43f07f..a63aa2a269eb6514222a7a9bada983a066abeabe 100644 --- a/src/app/components/pages/content-carousel-page/content-carousel-page.component.ts +++ b/src/app/components/pages/content-carousel-page/content-carousel-page.component.ts @@ -1,6 +1,9 @@ import { Component, OnInit } from '@angular/core'; import { Content } from '../../../models/content'; import { ContentType } from '../../../models/content-type.enum'; +import { AnswerOption } from '../../../models/answer-option'; +import { ContentChoice } from '../../../models/content-choice'; +import { ContentText } from '../../../models/content-text'; @Component({ selector: 'app-content-carousel-page', @@ -9,8 +12,41 @@ import { ContentType } from '../../../models/content-type.enum'; }) export class ContentCarouselPageComponent implements OnInit { ContentType: ContentType; + CHOICE: ContentType = ContentType.CHOICE; + BINARY: ContentType = ContentType.BINARY; + SCALE: ContentType = ContentType.SCALE; + NUMBER: ContentType = ContentType.NUMBER; + TEXT: ContentType = ContentType.TEXT; + GRID: ContentType = ContentType.GRID; - contents: Content[]; + test = [1, 2]; +// contents: Content[]; + contents = [ + new ContentChoice('0', + '1', + 'roomId1', + 'MultipleChoice Subject', + 'MultipleChoice Body', + 1, + [new AnswerOption('yes', ''), new AnswerOption('no', '')], + [], + true), + new ContentChoice('0', + '1', + 'roomId2', + 'SingleChoice Subject', + 'SingleChoide Body', + 1, + [new AnswerOption('yes', ''), new AnswerOption('no', '')], + [], + false), + new ContentText('1', + '1', + '0', + 'TextContent Subject', + 'TextContent Body', + 1) +]; constructor() { }