Skip to content
Snippets Groups Projects
Commit 395c65fd authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Fix comment loading for export

parent ed686a31
1 merge request!203Fix comment loading for export
Pipeline #26996 passed with stages
in 4 minutes and 37 seconds
......@@ -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') {
......
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