Merge branch 'DM-370' into 'master'
DM-370: Filtered out ASSIGN_REVIEWER notification. See merge request redactmanager/red-ui!40
This commit is contained in:
commit
5a3ec3c636
@ -25,6 +25,7 @@ const NOTIFICATIONS_THRESHOLD = 1000;
|
||||
export class NotificationsService extends EntitiesService<INotification, Notification> implements OnDestroy {
|
||||
readonly #config = getConfig<AppConfig>();
|
||||
readonly #subscription = new Subscription();
|
||||
readonly #filterDocumineNotifications: string[] = [NotificationTypes.ASSIGN_REVIEWER];
|
||||
protected readonly _defaultModelPath = 'notification';
|
||||
protected readonly _entityClass = Notification;
|
||||
|
||||
@ -118,6 +119,10 @@ export class NotificationsService extends EntitiesService<INotification, Notific
|
||||
const todayDate = dayjs(new Date());
|
||||
|
||||
notifications = notifications.filter(n => {
|
||||
if (this.#config.IS_DOCUMINE && this.#filterDocumineNotifications.includes(n.notificationType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(n.notificationType in NotificationTypes)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user