Commit 670e112b authored by Tom Käsler's avatar Tom Käsler

Merge branch '252-comment-loading' into 'master'

Fix comment loading for export

Closes #252

See merge request arsnova-lite!203
parents ed686a31 395c65fd
......@@ -6,6 +6,7 @@
margin-bottom: 20px;
min-width: 220px;
background-color: var(--red);
color: var(--on-secondary);
}
.export {
......
......@@ -91,6 +91,10 @@ export class RoomEditComponent implements OnInit {
}
exportCsv(delimiter: string, date: string): void {
this.commentService.getComments(this.editRoom.id)
.subscribe(comments => {
this.comments = comments;
});
const exportComments = JSON.parse(JSON.stringify(this.comments));
let csv: string;
let keyFields = '';
......
......@@ -10,7 +10,6 @@ import { RoomEditComponent } from '../_dialogs/room-edit/room-edit.component';
import { TranslateService } from '@ngx-translate/core';
import { LanguageService } from '../../../services/util/language.service';
import { TSMap } from 'typescript-map';
import { CommentService } from '../../../services/http/comment.service';
@Component({
selector: 'app-room-creator-page',
......@@ -30,8 +29,7 @@ export class RoomCreatorPageComponent extends RoomPageComponent implements OnIni
protected location: Location,
public dialog: MatDialog,
private translateService: TranslateService,
protected langService: LanguageService,
public commentService: CommentService) {
protected langService: LanguageService) {
super(roomService, route, location);
langService.langEmitter.subscribe(lang => translateService.use(lang));
}
......@@ -68,10 +66,6 @@ export class RoomCreatorPageComponent extends RoomPageComponent implements OnIni
});
dialogRef.componentInstance.editRoom = this.updRoom;
dialogRef.componentInstance.commentThreshold = this.updCommentThreshold;
this.commentService.getComments(this.room.id)
.subscribe(comments => {
dialogRef.componentInstance.comments = comments;
});
dialogRef.afterClosed()
.subscribe(result => {
if (result === 'abort') {
......
Markdown is supported
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