From dad25c7c2efc7d9913b1bfff55f8a80011adf797 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Tue, 5 Sep 2023 18:27:26 +0300 Subject: [PATCH] DM-370: added documine condition --- .../notifications-screen.component.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.ts b/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.ts index 0b0be7f6a..637c3e69e 100644 --- a/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.ts +++ b/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.ts @@ -77,14 +77,15 @@ export class NotificationsScreenComponent extends BaseFormComponent implements O async save() { this.#loadingService.start(); try { - const preferences = this.isPreferenceChecked('inAppNotifications', 'ASSIGN_APPROVER') - ? this.form.value - : { - ...this.form.value, - inAppNotifications: this.form - .get('inAppNotifications') - .value.filter((preference: string) => !RSS_EXCLUDED_SETTINGS.includes(preference)), - }; + const preferences = + !this.isPreferenceChecked('inAppNotifications', 'ASSIGN_APPROVER') && this.#config.IS_DOCUMINE + ? { + ...this.form.value, + inAppNotifications: this.form + .get('inAppNotifications') + .value.filter((preference: string) => !RSS_EXCLUDED_SETTINGS.includes(preference)), + } + : this.form.value; await firstValueFrom(this.#notificationPreferencesService.update(preferences)); } catch (e) { this.#toaster.error(_('notifications-screen.error.generic'));