From 27407de532bc28726a0955d58ddf780f999b0ebb Mon Sep 17 00:00:00 2001 From: Raphael Stief Date: Sat, 24 Feb 2024 15:10:07 +0100 Subject: [PATCH] Fixed settings enabled/disabled buttons --- .../iris-common-sub-settings-update.component.html | 14 ++------------ .../iris-common-sub-settings-update.component.ts | 3 +-- ...is-common-sub-settings-update.component.spec.ts | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/main/webapp/app/iris/settings/iris-settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.html b/src/main/webapp/app/iris/settings/iris-settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.html index f05216401528..350a4a555499 100644 --- a/src/main/webapp/app/iris/settings/iris-settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.html +++ b/src/main/webapp/app/iris/settings/iris-settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.html @@ -9,20 +9,10 @@ } }
-
+
{{ 'artemisApp.iris.settings.subSettings.enabled.on' | artemisTranslate }}
-
+
{{ 'artemisApp.iris.settings.subSettings.enabled.off' | artemisTranslate }}
diff --git a/src/main/webapp/app/iris/settings/iris-settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.ts b/src/main/webapp/app/iris/settings/iris-settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.ts index 73a23b17627e..fb8ec3e25e82 100644 --- a/src/main/webapp/app/iris/settings/iris-settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.ts +++ b/src/main/webapp/app/iris/settings/iris-settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.ts @@ -116,11 +116,10 @@ export class IrisCommonSubSettingsUpdateComponent implements OnInit, OnChanges { } return false; } - get isChatSettingsSwitchDisabled() { + get isSettingsSwitchDisabled() { return this.inheritDisabled || (!this.isAdmin && this.settingsType !== this.EXERCISE); } protected readonly IrisSubSettings = IrisSubSettings; protected readonly IrisSubSettingsType = IrisSubSettingsType; - protected readonly IrisSettingsType = IrisSettingsType; } diff --git a/src/test/javascript/spec/component/iris/settings/iris-common-sub-settings-update.component.spec.ts b/src/test/javascript/spec/component/iris/settings/iris-common-sub-settings-update.component.spec.ts index cf66d348c0af..0893dd28d72a 100644 --- a/src/test/javascript/spec/component/iris/settings/iris-common-sub-settings-update.component.spec.ts +++ b/src/test/javascript/spec/component/iris/settings/iris-common-sub-settings-update.component.spec.ts @@ -79,7 +79,7 @@ describe('IrisCommonSubSettingsUpdateComponent Component', () => { fixture.detectChanges(); expect(comp.inheritDisabled).toBeTrue(); - expect(comp.isChatSettingsSwitchDisabled).toBeTrue(); + expect(comp.isSettingsSwitchDisabled).toBeTrue(); }); it('change allowed model', () => {