DM-370: added documine condition
This commit is contained in:
parent
c2e382ec73
commit
dad25c7c2e
@ -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'));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user