Skip to content

Commit bf78b05

Browse files
authored
Merge pull request #1628 from CSCfi/CSCTTV-2997
CSCTTV-2997
2 parents bd75e33 + 2db4f18 commit bf78b05

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

src/app/layout/footer/footer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ <h2 i18n="@@followUs" class="header">Seuraa meitä!</h2>
185185
</div>
186186

187187
<ng-template #reviewDialog>
188-
<app-review></app-review>
188+
<app-review (onClose)="closeDialog()"></app-review>
189189
</ng-template>
190190

191191
<app-dialog

src/app/portal/components/accessibility/accessibility.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h1 [innerHTML]="content['title' + currentLocale]"></h1>
3939
</main>
4040

4141
<ng-template #reviewDialog>
42-
<app-review></app-review>
42+
<app-review (onClose)='toggleReview()'></app-review>
4343
</ng-template>
4444

4545
<app-dialog

src/app/portal/components/home-page/home-page.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ <h3 class="header">
216216
</main>
217217

218218
<ng-template #reviewDialog>
219-
<app-review></app-review>
219+
<app-review (onClose)='toggleReview()'></app-review>
220220
</ng-template>
221221

222222
<app-dialog

src/app/portal/components/service-info/service-info.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h2 [id]="item['title' + currentLocale]">
6565
</main>
6666

6767
<ng-template #reviewDialog>
68-
<app-review></app-review>
68+
<app-review (onClose)='toggleReview()'></app-review>
6969
</ng-template>
7070

7171
<app-dialog

src/app/shared/components/dialog/dialog.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,6 @@ export class DialogComponent implements OnInit, OnDestroy, OnChanges {
160160

161161
ngOnDestroy(): void {
162162
this.dialogResultSub?.unsubscribe();
163+
this.dialogRef.close();
163164
}
164165
}

src/app/shared/components/review/review.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// :author: CSC - IT Center for Science Ltd., Espoo Finland [email protected]
66
// :license: MIT
77

8-
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
8+
import { Component, EventEmitter, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core';
99
import { Router } from '@angular/router';
1010
import { HttpClient } from '@angular/common/http';
1111
import { Observable, Subscription } from 'rxjs';
@@ -42,6 +42,8 @@ export class ReviewComponent implements OnInit, OnDestroy {
4242
success = false;
4343
faTimes = faTimes;
4444

45+
@Output() onClose = new EventEmitter<void>();
46+
4547
targets: string[] = [
4648
$localize`:@@fromAccessibility:Saavutettavuudesta`,
4749
$localize`:@@fromPrivacy:Tietosuojasta`,
@@ -151,4 +153,8 @@ export class ReviewComponent implements OnInit, OnDestroy {
151153
ngOnDestroy(): void {
152154
this.sendPostSub?.unsubscribe();
153155
}
156+
157+
close() {
158+
this.onClose.emit();
159+
}
154160
}

0 commit comments

Comments
 (0)