Skip to content
Snippets Groups Projects
Verified Commit 30499a7a authored by Lukas Maximilian Kimpel's avatar Lukas Maximilian Kimpel
Browse files

Refactor content's id to contentId (more unique)

parent 7e32e818
No related merge requests found
......@@ -45,7 +45,7 @@ export class ContentCreationComponent implements OnInit {
this.contentService.addContent({ subject: subject, body: body, roomId: this.roomId } as Content)
.subscribe(content => {
this.notification.show(`Content '${content.subject}' successfully created.`);
this.router.navigate([`/creator/room/${content.roomId}/${content.id}`]);
this.router.navigate([`/creator/room/${content.roomId}/${content.contentId}`]);
this.dialogRef.close();
});
}
......
......@@ -5,7 +5,7 @@
<mat-card-title>
<h3 class="subheading-2">{{content.subject}}</h3>
</mat-card-title>
<mat-card-subtitle>ID: {{ content.id }}
<mat-card-subtitle>ID: {{ content.contentId }}
<br> Round: {{ content.round }}</mat-card-subtitle>
</mat-card-header>
<mat-divider></mat-divider>
......@@ -21,7 +21,7 @@
<mat-divider></mat-divider>
<!-- answes list here -->
<mat-card-actions>
<button mat-button color="primary" matTooltip="Create new content" routerLink="/creator/room/{{content.id}}/content-creation">
<button mat-button color="primary" matTooltip="Create new content" routerLink="/creator/room/{{content.contentId}}/content-creation">
Create answer
</button>
<button mat-button color="warn" matTooltip="Delete selected answer">
......
<mat-list>
<mat-list-item *ngFor="let content of contents">
<button mat-button routerLink="{{content.id}}">
Content {{content.id}}: {{content.subject}}
<button mat-button routerLink="{{content.contentId}}">
Content {{content.contentId}}: {{content.subject}}
</button>
</mat-list-item>
</mat-list>
import { ContentType } from './content-type';
export class Content {
id: string;
contentId: string;
revision: string;
roomId: string;
subject: string;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment