DM-370: Filtered out ASSIGN_REVIEWER notification.

This commit is contained in:
Nicoleta Panaghiu 2023-08-29 14:00:01 +03:00
parent a5fbf0975e
commit 5844e656c3

View File

@ -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;
}