diff --git a/apps/red-ui/src/app/components/user-menu/user-menu.component.html b/apps/red-ui/src/app/components/user-menu/user-menu.component.html
index 5cc6b5e25..de842e814 100644
--- a/apps/red-ui/src/app/components/user-menu/user-menu.component.html
+++ b/apps/red-ui/src/app/components/user-menu/user-menu.component.html
@@ -5,7 +5,7 @@
- 1" [id]="'switch-accounts'" [matMenuTriggerFor]="tenantsMenu" mat-menu-item>
+
{{ 'top-bar.navigation-items.my-account.children.select-tenant' | translate }}
diff --git a/apps/red-ui/src/app/modules/admin/screens/license/components/license-usage/license-usage.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/components/license-usage/license-usage.component.ts
index 0e423a730..8e10ee3c8 100644
--- a/apps/red-ui/src/app/modules/admin/screens/license/components/license-usage/license-usage.component.ts
+++ b/apps/red-ui/src/app/modules/admin/screens/license/components/license-usage/license-usage.component.ts
@@ -1,5 +1,4 @@
import { Component } from '@angular/core';
-import { TranslateService } from '@ngx-translate/core';
import { LicenseService } from '@services/license.service';
import { map } from 'rxjs/operators';
import type { ILicenseReport } from '@red/domain';
@@ -22,7 +21,7 @@ export class LicenseUsageComponent {
})),
);
- constructor(readonly licenseService: LicenseService, private readonly _translateService: TranslateService) {}
+ constructor(readonly licenseService: LicenseService) {}
getAnalysisPercentageOfLicense() {
const totalLicensedNumberOfPages = this.licenseService.totalLicensedNumberOfPages;
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html
index fec0d8467..a64d7c690 100644
--- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html
+++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html
@@ -52,6 +52,7 @@
*ngFor="let dictionary of dictionaries"
[matTooltip]="dictionary.description"
[value]="dictionary.type"
+ (click)="typeChanged()"
matTooltipPosition="after"
>
{{ dictionary.label }}
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts
index 080bd28bd..4755d984e 100644
--- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts
+++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts
@@ -141,6 +141,14 @@ export class RedactTextDialogComponent
}
}
+ typeChanged() {
+ if (!this.#applyToAllDossiers) {
+ const selectedDictionaryType = this.form.get('dictionary').value;
+ const selectedDictionary = this.dictionaries.find(d => d.type === selectedDictionaryType);
+ this.options[1].extraOption.disabled = selectedDictionary.dossierDictionaryOnly;
+ }
+ }
+
save(): void {
this.#enhanceManualRedaction(this.data.manualRedactionEntryWrapper.manualRedactionEntry);
const redaction = this.data.manualRedactionEntryWrapper.manualRedactionEntry;
diff --git a/apps/red-ui/src/app/services/license.service.ts b/apps/red-ui/src/app/services/license.service.ts
index 8ababb1a5..d2cabf2b8 100644
--- a/apps/red-ui/src/app/services/license.service.ts
+++ b/apps/red-ui/src/app/services/license.service.ts
@@ -1,10 +1,11 @@
import { inject, Injectable } from '@angular/core';
-import { GenericService } from '@iqser/common-ui';
+import { GenericService, Toaster } from '@iqser/common-ui';
import { ILicense, ILicenseReport, ILicenseReportRequest, ILicenses } from '@red/domain';
import { BehaviorSubject, firstValueFrom, Observable, of } from 'rxjs';
import { catchError, filter, tap } from 'rxjs/operators';
import dayjs from 'dayjs';
import { NGXLogger } from 'ngx-logger';
+import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
const defaultOnError: ILicenses = {
activeLicense: 'err',
@@ -42,6 +43,7 @@ export class LicenseService extends GenericService {
readonly #licenseData$ = new BehaviorSubject(undefined);
readonly #selectedLicense$ = new BehaviorSubject(undefined);
readonly #logger = inject(NGXLogger);
+ readonly #toaster = inject(Toaster);
protected readonly _defaultModelPath = 'report';
readonly licenseData$: Observable;
readonly selectedLicense$: Observable;
@@ -60,6 +62,10 @@ export class LicenseService extends GenericService {
filter(licenses => !!licenses),
tap(data => (this.activeLicenseId = data.activeLicense)),
tap(() => {
+ const activeLicense = this.activeLicense;
+ if (!activeLicense) {
+ return;
+ }
const uploadedBytesCapacity = this.activeLicense.features.find(f => f.name === 'uploadedBytesCapacity')?.value;
this.uploadedBytesCapacity = uploadedBytesCapacity ? parseInt(uploadedBytesCapacity, 10) : 0;
}),
@@ -82,7 +88,6 @@ export class LicenseService extends GenericService {
get activeLicenseKey(): string {
const activeLicense = this.activeLicense;
if (!activeLicense) {
- this.#logger.error('[LICENSE] No active license found!');
return '';
}
@@ -136,6 +141,11 @@ export class LicenseService extends GenericService {
const licenses = await firstValueFrom(licenses$);
this.#licenseData$.next(licenses);
this.setDefaultSelectedLicense();
+ const activeLicense = this.activeLicense;
+ if (!activeLicense) {
+ this.#logger.error('[LICENSE] No active license found!');
+ this.#toaster.warning(_('no-active-license'));
+ }
}
setSelectedLicense($event: ILicense) {
diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json
index 81c54b00d..47c314791 100644
--- a/apps/red-ui/src/assets/i18n/redact/de.json
+++ b/apps/red-ui/src/assets/i18n/redact/de.json
@@ -1722,6 +1722,7 @@
}
},
"minutes": "",
+ "no-active-license": "",
"notification": {
"assign-approver": "Sie wurden dem Dokument {fileHref, select, null{{fileName}} other{{fileName}}} im Dossier {dossierHref, select, null{{dossierName}} other{{dossierName}}} als Genehmiger zugewiesen!",
"assign-reviewer": "Sie wurden dem Dokument {fileHref, select, null{{fileName}} other{{fileName}}} im Dossier {dossierHref, select, null{{dossierName}} other{{dossierName}}} als Reviewer zugewiesen!",
diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json
index 115a7536f..ad03facbb 100644
--- a/apps/red-ui/src/assets/i18n/redact/en.json
+++ b/apps/red-ui/src/assets/i18n/redact/en.json
@@ -1722,6 +1722,7 @@
}
},
"minutes": "minutes",
+ "no-active-license": "Invalid or corrupt license – Please contact your administrator",
"notification": {
"assign-approver": "You have been assigned as approver for {fileHref, select, null{{fileName}} other{{fileName}}} in dossier: {dossierHref, select, null{{dossierName}} other{{dossierName}}}!",
"assign-reviewer": "You have been assigned as reviewer for {fileHref, select, null{{fileName}} other{{fileName}}} in dossier: {dossierHref, select, null{{dossierName}} other{{dossierName}}}!",
diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json
index 802b70e0a..3d272400d 100644
--- a/apps/red-ui/src/assets/i18n/scm/de.json
+++ b/apps/red-ui/src/assets/i18n/scm/de.json
@@ -1722,6 +1722,7 @@
}
},
"minutes": "",
+ "no-active-license": "",
"notification": {
"assign-approver": "Sie wurden dem Dokument {fileHref, select, null{{fileName}} other{{fileName}}} im Dossier {dossierHref, select, null{{dossierName}} other{{dossierName}}} als Genehmiger zugewiesen!",
"assign-reviewer": "Sie wurden dem Dokument {fileHref, select, null{{fileName}} other{{fileName}}} im Dossier {dossierHref, select, null{{dossierName}} other{{dossierName}}} als Reviewer zugewiesen!",
diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json
index fff968727..5b8fc7d75 100644
--- a/apps/red-ui/src/assets/i18n/scm/en.json
+++ b/apps/red-ui/src/assets/i18n/scm/en.json
@@ -1722,6 +1722,7 @@
}
},
"minutes": "minutes",
+ "no-active-license": "Invalid or corrupt license – Please contact your administrator",
"notification": {
"assign-approver": "You have been assigned as approver for {fileHref, select, null{{fileName}} other{{fileName}}} in dossier: {dossierHref, select, null{{dossierName}} other{{dossierName}}}!",
"assign-reviewer": "You have been assigned as reviewer for {fileHref, select, null{{fileName}} other{{fileName}}} in dossier: {dossierHref, select, null{{dossierName}} other{{dossierName}}}!",
diff --git a/libs/common-ui b/libs/common-ui
index a4e425d37..a8f5fb2e2 160000
--- a/libs/common-ui
+++ b/libs/common-ui
@@ -1 +1 @@
-Subproject commit a4e425d3739d6145325a8fe347d9fcae1e12a662
+Subproject commit a8f5fb2e25cd1f150c1099d387b4f9dece3b922c