diff options
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r-- | client/src/app/shared/users/user-notifications.component.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/shared/users/user-notifications.component.ts b/client/src/app/shared/users/user-notifications.component.ts index b5f9fd399..ce43b604a 100644 --- a/client/src/app/shared/users/user-notifications.component.ts +++ b/client/src/app/shared/users/user-notifications.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
2 | import { UserNotificationService } from '@app/shared/users/user-notification.service' | 2 | import { UserNotificationService } from '@app/shared/users/user-notification.service' |
3 | import { UserNotificationType } from '../../../../../shared' | 3 | import { UserNotificationType } from '../../../../../shared' |
4 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' | 4 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' |
@@ -15,6 +15,8 @@ export class UserNotificationsComponent implements OnInit { | |||
15 | @Input() infiniteScroll = true | 15 | @Input() infiniteScroll = true |
16 | @Input() itemsPerPage = 20 | 16 | @Input() itemsPerPage = 20 |
17 | 17 | ||
18 | @Output() notificationsLoaded = new EventEmitter() | ||
19 | |||
18 | notifications: UserNotification[] = [] | 20 | notifications: UserNotification[] = [] |
19 | 21 | ||
20 | // So we can access it in the template | 22 | // So we can access it in the template |
@@ -43,6 +45,8 @@ export class UserNotificationsComponent implements OnInit { | |||
43 | result => { | 45 | result => { |
44 | this.notifications = this.notifications.concat(result.data) | 46 | this.notifications = this.notifications.concat(result.data) |
45 | this.componentPagination.totalItems = result.total | 47 | this.componentPagination.totalItems = result.total |
48 | |||
49 | this.notificationsLoaded.emit() | ||
46 | }, | 50 | }, |
47 | 51 | ||
48 | err => this.notifier.error(err.message) | 52 | err => this.notifier.error(err.message) |