diff --git a/src/app/components/participant/_diaglogs/submit-comment/submit-comment.component.ts b/src/app/components/participant/_diaglogs/submit-comment/submit-comment.component.ts index 6444fa9a8adef0399daca900afc224b50d6f1e01..8560264538462093ec872957021b4319c0a2e546 100644 --- a/src/app/components/participant/_diaglogs/submit-comment/submit-comment.component.ts +++ b/src/app/components/participant/_diaglogs/submit-comment/submit-comment.component.ts @@ -1,4 +1,12 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, Inject, OnInit } from '@angular/core'; +import { Comment } from '../../../../models/comment'; +import { Router } from '@angular/router'; +import { NotificationService } from '../../../../services/util/notification.service'; +import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material'; +import { TranslateService } from '@ngx-translate/core'; +import { CommentCreatePageComponent } from '../../comment-create-page/comment-create-page.component'; +import { AuthenticationService } from '../../../../services/http/authentication.service'; + @Component({ selector: 'app-submit-comment', @@ -7,9 +15,26 @@ import { Component, OnInit } from '@angular/core'; }) export class SubmitCommentComponent implements OnInit { - constructor() { } + comment: Comment; + + constructor(private router: Router, + private notification: NotificationService, + public dialogRef: MatDialogRef<CommentCreatePageComponent>, + private translateService: TranslateService, + protected authenticationService: AuthenticationService, + public dialog: MatDialog, + @Inject(MAT_DIALOG_DATA) public data: any) { + } ngOnInit() { + this.translateService.use(localStorage.getItem('currentLang')); } + onNoClick(): void { + this.dialogRef.close('abort'); + } + + closeDialog(action: string) { + this.dialogRef.close(action); + } }