From fcba52000333e4957c04ff11c0b423d50d4d9670 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Wed, 7 Aug 2024 21:14:37 +0300 Subject: [PATCH 1/7] RED-9788 - Adapt Annotation column to display only annotations per component if component is selected --- ...le-structured-component-value.component.ts | 43 ++++--------------- .../file-workload.component.html | 2 +- .../file-workload/file-workload.component.ts | 19 +++++--- ...ructured-component-management.component.ts | 9 ---- .../services/file-preview-state.service.ts | 13 +++++- apps/red-ui/src/assets/config/config.json | 10 ++--- 6 files changed, 40 insertions(+), 56 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.ts b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.ts index 51bf95b54..90dd06fc8 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.ts @@ -3,11 +3,11 @@ import { KeyValuePipe, NgClass, NgForOf, NgIf } from '@angular/common'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MatIcon } from '@angular/material/icon'; -import { FilterService } from '@common-ui/filtering'; import { CircleButtonComponent, IconButtonComponent, IconButtonTypes, IqserDialog } from '@iqser/common-ui'; import { TranslateModule } from '@ngx-translate/core'; import { IComponentLogEntry, IComponentValue } from '@red/domain'; import { RevertValueDialogComponent } from '../../dialogs/docu-mine/revert-value-dialog/revert-value-dialog.component'; +import { FilePreviewStateService } from '../../services/file-preview-state.service'; @Component({ selector: 'redaction-editable-structured-component-value [entry] [canEdit]', @@ -43,8 +43,8 @@ export class EditableStructuredComponentValueComponent implements OnInit { selected = false; constructor( - private readonly _filtersService: FilterService, private readonly _iqserDialog: IqserDialog, + private readonly _state: FilePreviewStateService, ) {} get disabled() { @@ -91,7 +91,7 @@ export class EditableStructuredComponentValueComponent implements OnInit { } this.deselectLast.emit(); this.selected = true; - this.#setWorkloadFilters(); + this._state.componentReferenceIds = this.#getUniqueReferencesIds(this.entry.componentValues); } } @@ -106,7 +106,7 @@ export class EditableStructuredComponentValueComponent implements OnInit { $event?.stopImmediatePropagation(); this.selected = false; this.editing = false; - this._filtersService.deactivateFilters({ primaryFiltersSlug: 'primaryFilters' }); + this._state.componentReferenceIds = null; } removeValue(index: number) { @@ -150,41 +150,14 @@ export class EditableStructuredComponentValueComponent implements OnInit { return value.replace(/\n/g, '
'); } - #setWorkloadFilters() { - this._filtersService.deactivateFilters({ primaryFiltersSlug: 'primaryFilters' }); - const uniqueLabels = this.#getUniqueReferencesLabels(this.entry.componentValues); - let setFilterCount = 0; - for (const label of uniqueLabels) { - const setFilter = this.#setFilter(label); - if (setFilter) { - setFilterCount++; - } - } - if (!setFilterCount) { - this.#setFilter('no-annotations-filter'); - } - } - - #setFilter(label: string) { - const filterGroup = this._filtersService.getGroup('primaryFilters'); - for (const filter of filterGroup.filters) { - const nestedFilter = filter.children.find(f => f.label.toLowerCase() === label); - if (nestedFilter) { - this._filtersService.filterCheckboxClicked({ nestedFilter, filterGroup, primaryFiltersSlug: 'primaryFilters' }); - return true; - } - } - } - - #getUniqueReferencesLabels(values: IComponentValue[]) { - const labels: Set = new Set(); + #getUniqueReferencesIds(values: IComponentValue[]) { + const ids: Set = new Set(); for (const value of values) { for (const reference of value.entityReferences) { - const label = reference.type?.replace(/_/g, ' ')?.toLowerCase(); - labels.add(label); + ids.add(reference.id); } } - return labels; + return Array.from(ids); } #updateTextAreaHeight() { diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html index 9e6fac31b..ce6756679 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html @@ -186,7 +186,7 @@ {{ 'file-preview.tabs.annotations.no-annotations' | translate }} diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts index 4cb63a58d..0f0c47c83 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts @@ -20,7 +20,7 @@ import { AutoUnsubscribe, Debounce, IqserEventTarget } from '@iqser/common-ui/li import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { ListItem } from '@models/file/list-item'; import { TranslateModule } from '@ngx-translate/core'; -import { WorkflowFileStatuses } from '@red/domain'; +import { ComponentLogEntry, WorkflowFileStatuses } from '@red/domain'; import { workloadTranslations } from '@translations/workload-translations'; import { UserPreferenceService } from '@users/user-preference.service'; import { getLocalStorageDataByFileId } from '@utils/local-storage'; @@ -176,11 +176,14 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On this.fileDataService.all$, primary$, secondary$, + this.state.componentReferenceIds$, this.listingService.selected$, this._pageRotationService.rotations$, ]).pipe( delay(0), - map(([annotations, primary, secondary]) => this.#filterAnnotations(annotations, primary, secondary)), + map(([annotations, primary, secondary, componentReferenceIds]) => + this.#filterAnnotations(annotations, primary, secondary, componentReferenceIds), + ), map(annotations => this.#mapListItemsFromAnnotationWrapperArray(annotations)), tap(annotations => this.#scrollToFirstAnnotationPage(annotations)), ); @@ -399,6 +402,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On annotations: AnnotationWrapper[], primary: INestedFilter[], secondary: INestedFilter[] = [], + componentReferenceIds: string[], ): Map { const onlyPageWithAnnotations = this.viewModeService.onlyPagesWithAnnotations(); if (!primary || primary.length === 0) { @@ -410,8 +414,13 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On annotations = annotations.filter(a => !a.isRemoved); } - if (this.isDocumine && !this.#isIqserDevMode) { - annotations = annotations.filter(a => !a.isOCR); + if (this.isDocumine) { + if (!this.#isIqserDevMode) { + annotations = annotations.filter(a => !a.isOCR); + } + if (componentReferenceIds) { + annotations = annotations.filter(a => componentReferenceIds.includes(a.id)); + } } this.displayedAnnotations = this._annotationProcessingService.filterAndGroupAnnotations(annotations, primary, secondary); @@ -424,7 +433,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On this.displayedPages = []; } this.displayedAnnotations.clear(); - } else if (enabledFilters.length || onlyPageWithAnnotations) { + } else if (enabledFilters.length || onlyPageWithAnnotations || componentReferenceIds) { this.displayedPages = pagesThatDisplayAnnotations; } else { this.displayedPages = this.#allPages; diff --git a/apps/red-ui/src/app/modules/file-preview/components/structured-component-management/structured-component-management.component.ts b/apps/red-ui/src/app/modules/file-preview/components/structured-component-management/structured-component-management.component.ts index 4cc3bb5bf..0ec8d38ea 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/structured-component-management/structured-component-management.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/structured-component-management/structured-component-management.component.ts @@ -3,7 +3,6 @@ import { List } from '@common-ui/utils'; import { IconButtonTypes, LoadingService } from '@iqser/common-ui'; import { ComponentLogEntry, Dictionary, File, IComponentLogEntry, WorkflowFileStatuses } from '@red/domain'; import { ComponentLogService } from '@services/files/component-log.service'; -import { UserPreferenceService } from '@users/user-preference.service'; import { combineLatest, firstValueFrom, Observable } from 'rxjs'; import { EditableStructuredComponentValueComponent } from '../editable-structured-component-value/editable-structured-component-value.component'; import { FilterService, PopupFilterComponent } from '@common-ui/filtering'; @@ -23,7 +22,6 @@ import { TranslateModule } from '@ngx-translate/core'; export class StructuredComponentManagementComponent implements OnInit { protected readonly componentLogData = signal(undefined); protected readonly componentLogData$ = toObservable(this.componentLogData); - protected readonly openScmDialogByDefault = signal(this.userPreferences.getOpenScmDialogByDefault()); protected readonly iconButtonTypes = IconButtonTypes; protected displayedComponents$: Observable; @Input() file: File; @@ -35,7 +33,6 @@ export class StructuredComponentManagementComponent implements OnInit { private readonly _loadingService: LoadingService, private readonly _componentLogFilterService: ComponentLogFilterService, private readonly _filterService: FilterService, - readonly userPreferences: UserPreferenceService, ) {} get canEdit() { @@ -54,12 +51,6 @@ export class StructuredComponentManagementComponent implements OnInit { } } - async toggleOpenScmDialogByDefault() { - await this.userPreferences.toggleOpenScmDialogByDefault(); - await this.userPreferences.reload(); - this.openScmDialogByDefault.set(this.userPreferences.getOpenScmDialogByDefault()); - } - async revertOverride(originalKey: string) { this._loadingService.start(); await firstValueFrom( diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-preview-state.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-preview-state.service.ts index 6f584dd5d..50b8f579e 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-preview-state.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-preview-state.service.ts @@ -14,7 +14,7 @@ import { FilesMapService } from '@services/files/files-map.service'; import { FilesService } from '@services/files/files.service'; import { PermissionsService } from '@services/permissions.service'; import { NGXLogger } from 'ngx-logger'; -import { firstValueFrom, from, merge, Observable, of, pairwise, Subject, switchMap } from 'rxjs'; +import { BehaviorSubject, firstValueFrom, from, merge, Observable, of, pairwise, Subject, switchMap } from 'rxjs'; import { filter, map, startWith, tap, withLatestFrom } from 'rxjs/operators'; import { ViewModeService } from './view-mode.service'; @@ -41,6 +41,8 @@ export class FilePreviewStateService { readonly isWritable: Signal; readonly dossierDictionary: Signal; readonly blob$: Observable; + readonly componentReferenceIds$: Observable; + readonly #componentReferenceIds$ = new BehaviorSubject(null); readonly dossierId = getParam(DOSSIER_ID); readonly dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID); readonly fileId = getParam(FILE_ID); @@ -62,6 +64,7 @@ export class FilePreviewStateService { this.dossier = toSignal(dossiersServiceResolver().getEntityChanged$(this.dossierId)); this.file$ = inject(FilesMapService).watch$(this.dossierId, this.fileId); this.file = toSignal(this.file$); + this.componentReferenceIds$ = this.#componentReferenceIds$.asObservable(); this.excludedPages = signal(this.file().excludedPages); this.isWritable = computed(() => { const isWritable = this._permissionsService.canPerformAnnotationActions(this.file(), this.dossier()); @@ -91,6 +94,10 @@ export class FilePreviewStateService { ); } + set componentReferenceIds(ids: string[]) { + this.#componentReferenceIds$.next(ids); + } + get dictionaries(): Dictionary[] { const dictionaries = this._dictionariesMapService.get(this.dossierTemplateId); if (this.dossierDictionary()) { @@ -126,6 +133,10 @@ export class FilePreviewStateService { ); } + get componentReferenceIds() { + return this.#componentReferenceIds$.getValue(); + } + reloadBlob(): void { this.#reloadBlob$.next(true); } diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 5f6c0ce6e..2ccc6f6d1 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,9 +1,9 @@ { "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, - "API_URL": "https://dan2.iqser.cloud", + "API_URL": "https://frontend2.iqser.cloud", "APP_NAME": "RedactManager", - "IS_DOCUMINE": false, + "IS_DOCUMINE": true, "RULE_EDITOR_DEV_ONLY": false, "AUTO_READ_TIME": 3, "BACKEND_APP_VERSION": "4.4.40", @@ -13,13 +13,13 @@ "MAX_RETRIES_ON_SERVER_ERROR": 3, "OAUTH_CLIENT_ID": "redaction", "OAUTH_IDP_HINT": null, - "OAUTH_URL": "https://dan2.iqser.cloud/auth", + "OAUTH_URL": "https://frontend2.iqser.cloud/auth", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview", "ANNOTATIONS_THRESHOLD": 1000, - "THEME": "redact", - "BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/redact/", + "THEME": "scm", + "BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/scm/", "AVAILABLE_NOTIFICATIONS_DAYS": 30, "AVAILABLE_OLD_NOTIFICATIONS_MINUTES": 60, "NOTIFICATIONS_THRESHOLD": 1000, From b623449efb7a9a68b0330b78d9e0a047bddb889f Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Wed, 7 Aug 2024 21:25:43 +0300 Subject: [PATCH 2/7] RED-9788 - remove active listing entity service --- .../workflow-item/workflow-item.component.html | 1 - .../workflow-item/workflow-item.component.scss | 2 +- .../workflow-item/workflow-item.component.ts | 3 --- .../file-download-btn.component.html | 4 ++-- .../file-download-btn.component.ts | 14 -------------- libs/common-ui | 2 +- 6 files changed, 4 insertions(+), 22 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.html index 4610330d1..77d368eb3 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.html @@ -1,7 +1,6 @@
diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.scss b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.scss index cedc4054d..1c6ea4bc6 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.scss +++ b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.scss @@ -12,7 +12,7 @@ } &:hover, - &.active-entity, + &:has(iqser-circle-button[aria-expanded='true']), &.help-mode-active { redaction-file-actions { display: initial; diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.ts index c8a1670ce..6f81ffc56 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.ts @@ -12,7 +12,6 @@ import { FileWorkloadComponent } from '../table-item/file-workload/file-workload import { ProcessingIndicatorComponent } from '@shared/components/processing-indicator/processing-indicator.component'; import { FileActionsComponent } from '../../../shared-dossiers/components/file-actions/file-actions.component'; import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; -import { ActiveListingEntityService } from '@common-ui/listing/services/active-listing-entity.service'; @Component({ selector: 'redaction-workflow-item', @@ -39,14 +38,12 @@ export class WorkflowItemComponent implements OnInit { @ViewChild('actionsWrapper', { static: true }) private _actionsWrapper: ElementRef; width: number; readonly trackBy = trackByFactory(); - readonly activeEntity = computed(() => this._activeListingEntityService.activeEntity() === this.file?.id); @Input({ required: true }) file: File; @Input({ required: true }) dossier: Dossier; @Input({ required: true }) displayedAttributes: IFileAttributeConfig[]; constructor( readonly fileAttributesService: FileAttributesService, - readonly _activeListingEntityService: ActiveListingEntityService, private readonly _changeRef: ChangeDetectorRef, @Optional() readonly helpModeService: HelpModeService, ) {} diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.html b/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.html index eb345e747..9659eeb5d 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.html +++ b/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.html @@ -1,6 +1,6 @@ @if (dropdownButton()) { } - + diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts b/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts index 74749f353..83b6089e4 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts @@ -10,7 +10,6 @@ import { TranslateModule } from '@ngx-translate/core'; import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu'; import { firstValueFrom } from 'rxjs'; import { ComponentLogService } from '@services/files/component-log.service'; -import { ActiveListingEntityService } from '@common-ui/listing/services/active-listing-entity.service'; @Component({ selector: 'redaction-file-download-btn', @@ -40,7 +39,6 @@ export class FileDownloadBtnComponent implements OnChanges { private readonly _permissionsService: PermissionsService, private readonly _fileDownloadService: FileDownloadService, private readonly _componentLogService: ComponentLogService, - private readonly _activeListingEntity: ActiveListingEntityService, private readonly _dialog: IqserDialog, private readonly _toaster: Toaster, ) {} @@ -85,18 +83,6 @@ export class FileDownloadBtnComponent implements OnChanges { .catch(() => this._toaster.error(_('download-status.error'))); } - onDownloadMenuClosed() { - this._activeListingEntity.updateEntity(); - } - - setActiveListingEntity($event: MouseEvent) { - $event.stopImmediatePropagation(); - if (this.dropdownButton()) { - const entityId = this.dossierDownload() ? this.dossier().id : this.files()[0].id; - this._activeListingEntity.updateEntity(entityId); - } - } - downloadComponentAsJSON($event: MouseEvent) { $event.stopImmediatePropagation(); this.menuTrigger?.closeMenu(); diff --git a/libs/common-ui b/libs/common-ui index 7f8336a64..00b1b40a3 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 7f8336a64f3e3bed6e4751be3c0624a98b4aa727 +Subproject commit 00b1b40a3112dc168046ca3bc261dd8dbbc02538 From d9ccf891669ef2f8ce00052b2c6326057d579820 Mon Sep 17 00:00:00 2001 From: project_703_bot_497bb7eb186ca592c63b3e50cd5c69e1 Date: Fri, 9 Aug 2024 01:03:30 +0000 Subject: [PATCH 3/7] push back localazy update --- apps/red-ui/src/assets/i18n/redact/de.json | 149 ++++++++++---------- apps/red-ui/src/assets/i18n/redact/en.json | 2 +- apps/red-ui/src/assets/i18n/scm/de.json | 153 ++++++++++----------- apps/red-ui/src/assets/i18n/scm/en.json | 6 +- 4 files changed, 154 insertions(+), 156 deletions(-) diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 7e3100886..071f49b78 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -100,7 +100,6 @@ "dialog": { "title": "{type, select, add{Neues Komponenten-Mapping erstellen} edit{Komponenten-Mapping bearbeiten} other{}}" }, - "disabled-file-options": "", "form": { "delimiter": "", "delimiter-placeholder": "", @@ -273,6 +272,9 @@ "watermarks": "Wasserzeichen" }, "analysis-disabled": "", + "annotation": { + "pending": "(Analyse steht aus)" + }, "annotation-actions": { "accept-recommendation": { "label": "Empfehlung annehmen" @@ -328,14 +330,14 @@ "error": "Rekategorisierung des Bilds fehlgeschlagen: {error}", "success": "Bild wurde einer neuen Kategorie zugeordnet." }, - "remove-hint": { - "error": "Entfernen des Hinweises fehlgeschlagen: {error}", - "success": "Hinweis wurde entfernt" - }, "remove": { "error": "Entfernen der Schwärzung fehlgeschlagen: {error}", "success": "Schwärzung wurde entfernt" }, + "remove-hint": { + "error": "Entfernen des Hinweises fehlgeschlagen: {error}", + "success": "Hinweis wurde entfernt" + }, "undo": { "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "success": "Rücksetzung erfolgreich" @@ -348,15 +350,15 @@ "remove-highlights": { "label": "Ausgewählte Markierungen entfernen" }, + "resize": { + "label": "Größe ändern" + }, "resize-accept": { "label": "Neue Größe speichern" }, "resize-cancel": { "label": "Größenänderung abbrechen" }, - "resize": { - "label": "Größe ändern" - }, "see-references": { "label": "Referenzen anzeigen" }, @@ -390,9 +392,6 @@ "skipped": "Ignorierte Schwärzung", "text-highlight": "Markierung" }, - "annotation": { - "pending": "(Analyse steht aus)" - }, "annotations": "Annotationen", "archived-dossiers-listing": { "no-data": { @@ -637,14 +636,18 @@ "warning": "Warnung: Wiederherstellung des Benutzers nicht möglich." }, "confirmation-dialog": { + "approve-file": { + "question": "Dieses Dokument enthält ungesehene Änderungen, die sich durch die Reanalyse ergeben haben.

Möchten Sie es trotzdem freigeben?", + "title": "Warnung!" + }, "approve-file-without-analysis": { "confirmationText": "Ohne Analyse freigeben", "denyText": "Abbrechen", "question": "Analyse zur Erkennung neuer Schwärzungen erforderlich.", "title": "Warnung!" }, - "approve-file": { - "question": "Dieses Dokument enthält ungesehene Änderungen, die sich durch die Reanalyse ergeben haben.

Möchten Sie es trotzdem freigeben?", + "approve-multiple-files": { + "question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen, die im Zuge einer Reanalyse hinzugefügt wurden.

Möchen Sie die Dateien wirklich freigeben?", "title": "Warnung!" }, "approve-multiple-files-without-analysis": { @@ -653,10 +656,6 @@ "question": "Für mindestens eine Datei ist ein Analyselauf zur Erkennung neuer Schwärzungen erforderlich.", "title": "Warnung" }, - "approve-multiple-files": { - "question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen, die im Zuge einer Reanalyse hinzugefügt wurden.

Möchen Sie die Dateien wirklich freigeben?", - "title": "Warnung!" - }, "assign-file-to-me": { "question": { "multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft.

Möchten Sie sich die Datei dennoch zuweisen?", @@ -1026,13 +1025,13 @@ "recent": "Neu ({hours} h)", "unassigned": "Keinem Bearbeiter zugewiesen" }, + "reanalyse": { + "action": "Datei analysieren" + }, "reanalyse-dossier": { "error": "Einplanung der Dateien für die Reanalyse fehlgeschlagen. Bitte versuchen Sie es noch einmal.", "success": "Dateien für Reanalyse vorgesehen." }, - "reanalyse": { - "action": "Datei analysieren" - }, "report-download": "", "start-auto-analysis": "Auto-Analyse aktivieren", "stop-auto-analysis": "Auto-Analyse anhalten", @@ -1103,6 +1102,14 @@ "total-documents": "Dokumente", "total-people": "{count} {count, plural, one{Benutzer} other {Benutzer}}" }, + "dossier-templates": { + "label": "Dossier-Vorlagen", + "status": { + "active": "Aktiv", + "inactive": "Inaktiv", + "incomplete": "Unvollständig" + } + }, "dossier-templates-listing": { "action": { "clone": "Vorlage klonen", @@ -1137,14 +1144,6 @@ "title": "{length} {length, plural, one{Dossier-Vorlage} other{Dossier-Vorlagen}}" } }, - "dossier-templates": { - "label": "Dossier-Vorlagen", - "status": { - "active": "Aktiv", - "inactive": "Inaktiv", - "incomplete": "Unvollständig" - } - }, "dossier-watermark-selector": { "heading": "Wasserzeichen auf Dokumenten", "no-watermark": "Kein Wasserzeichen in der Dossier-Vorlage verfügbar:
Bitten Sie Ihren Admin, eines zu konfigurieren.", @@ -1340,6 +1339,15 @@ "title": "{length} {length, plural, one{Wörterbuch} other{Wörterbücher}}" } }, + "entity": { + "info": { + "actions": { + "revert": "Zurücksetzen", + "save": "Änderungen speichern" + }, + "heading": "Entität bearbeiten" + } + }, "entity-rules-screen": { "error": { "generic": "Fehler: Aktualisierung der Entitätsregeln fehlgeschlagen." @@ -1354,28 +1362,19 @@ "warning-text": "Warnung: experimentelle Funktion!", "warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} in Regeln gefunden" }, - "entity": { - "info": { - "actions": { - "revert": "Zurücksetzen", - "save": "Änderungen speichern" - }, - "heading": "Entität bearbeiten" - } - }, "error": { "deleted-entity": { "dossier": { "action": "Zurück zur Übersicht", "label": "Dieses Dossier wurde gelöscht!" }, - "file-dossier": { - "action": "Zurück zur Übersicht", - "label": "Das Dossier dieser Datei wurde gelöscht!" - }, "file": { "action": "Zurück zum Dossier", "label": "Diese Datei wurde gelöscht!" + }, + "file-dossier": { + "action": "Zurück zur Übersicht", + "label": "Das Dossier dieser Datei wurde gelöscht!" } }, "file-preview": { @@ -1393,6 +1392,12 @@ }, "exact-date": "{day}. {month} {year} um {hour}:{minute} Uhr", "file": "Datei", + "file-attribute": { + "update": { + "error": "Aktualisierung des Werts für das Datei-Attribut fehlgeschlagen. Bitte versuchen Sie es noch einmal.", + "success": "Der Wert für das Dateiattribut wurde erfolgreich aktualisiert." + } + }, "file-attribute-encoding-types": { "ascii": "ASCII", "iso": "ISO-8859-1", @@ -1403,12 +1408,6 @@ "number": "Nummer", "text": "Freier Text" }, - "file-attribute": { - "update": { - "error": "Aktualisierung des Werts für das Datei-Attribut fehlgeschlagen. Bitte versuchen Sie es noch einmal.", - "success": "Der Wert für das Dateiattribut wurde erfolgreich aktualisiert." - } - }, "file-attributes-configurations": { "cancel": "Abbrechen", "form": { @@ -1626,15 +1625,6 @@ "csv": "Die Datei-Attribute wurden erfolgreich aus der hochgeladenen CSV-Datei importiert." } }, - "filter-menu": { - "filter-options": "Filteroptionen", - "filter-types": "Filter", - "label": "Filter", - "pages-without-annotations": "Nur Seiten ohne Annotationen", - "redaction-changes": "Nur Annotationen mit lokalen manuellen Änderungen", - "unseen-pages": "Nur Annotationen auf ungesehenen Seiten", - "with-comments": "Nur Annotationen mit Kommentaren" - }, "filter": { "analysis": "Analyse erforderlich", "comment": "Kommentare", @@ -1644,6 +1634,15 @@ "redaction": "Schwärzungen", "updated": "Aktualisiert" }, + "filter-menu": { + "filter-options": "Filteroptionen", + "filter-types": "Filter", + "label": "Filter", + "pages-without-annotations": "Nur Seiten ohne Annotationen", + "redaction-changes": "Nur Annotationen mit lokalen manuellen Änderungen", + "unseen-pages": "Nur Annotationen auf ungesehenen Seiten", + "with-comments": "Nur Annotationen mit Kommentaren" + }, "filters": { "assigned-people": "Bearbeiter", "documents-status": "Dokumentenstatus", @@ -1922,6 +1921,13 @@ "user-promoted-to-approver": "{user} wurde im Dossier {dossierHref, select, null{{dossierName}} other{{dossierName}}} zum Genehmiger ernannt!", "user-removed-as-dossier-member": "{user} wurde als Mitglied von: {dossierHref, select, null{{dossierName}} other{{dossierName}}} entfernt!" }, + "notifications": { + "button-text": "Benachrichtigungen", + "deleted-dossier": "Gelöschtes Dossier", + "label": "Benachrichtigungen", + "mark-all-as-read": "Alle als gelesen markieren", + "mark-as": "Als {type, select, read{gelesen} unread{ungelesen} other{}} markieren" + }, "notifications-screen": { "category": { "email-notifications": "E-Mail-Benachrichtigungen", @@ -1935,7 +1941,6 @@ "dossier": "Benachrichtigungen zu Dossiers", "other": "Andere Benachrichtigungen" }, - "options-title": "Wählen Sie aus, bei welchen Aktivitäten Sie benachrichtigt werden möchten", "options": { "ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen werde", "ASSIGN_REVIEWER": "Wenn ich einem Dokument als Prüfer zugewiesen werde", @@ -1953,6 +1958,7 @@ "USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde", "USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere" }, + "options-title": "Wählen Sie aus, bei welchen Aktivitäten Sie benachrichtigt werden möchten", "schedule": { "daily": "Tägliche Zusammenfassung", "instant": "Sofort", @@ -1960,13 +1966,6 @@ }, "title": "Benachrichtigungseinstellungen" }, - "notifications": { - "button-text": "Benachrichtigungen", - "deleted-dossier": "Gelöschtes Dossier", - "label": "Benachrichtigungen", - "mark-all-as-read": "Alle als gelesen markieren", - "mark-as": "Als {type, select, read{gelesen} unread{ungelesen} other{}} markieren" - }, "ocr": { "confirmation-dialog": { "cancel": "Abbrechen", @@ -2058,16 +2057,16 @@ "warnings-label": "Dialoge und Meldungen", "warnings-subtitle": "„Nicht mehr anzeigen“-Optionen" }, + "processing": { + "basic": "Verarbeitung läuft", + "ocr": "OCR" + }, "processing-status": { "ocr": "OCR", "pending": "Ausstehend", "processed": "Verarbeitet", "processing": "Verarbeitung läuft" }, - "processing": { - "basic": "Verarbeitung läuft", - "ocr": "OCR" - }, "readonly": "Lesemodus", "readonly-archived": "Lesemodus (archiviert)", "redact-text": { @@ -2303,6 +2302,12 @@ "red-user-admin": "Benutzeradmin", "regular": "regulärer Benutzer" }, + "search": { + "active-dossiers": "Dokumente in aktiven Dossiers", + "all-dossiers": "Alle Dokumente", + "placeholder": "Dokumente durchsuchen...", + "this-dossier": "In diesem Dossier" + }, "search-screen": { "cols": { "assignee": "Bearbeiter", @@ -2326,12 +2331,6 @@ "no-match": "Der Suchbegriff wurde in keinem der Dokumente gefunden.", "table-header": "{length} {length, plural, one{Suchergebnis} other{Suchergebnisse}}" }, - "search": { - "active-dossiers": "Dokumente in aktiven Dossiers", - "all-dossiers": "Alle Dokumente", - "placeholder": "Dokumente durchsuchen...", - "this-dossier": "In diesem Dossier" - }, "seconds": "Sekunden", "size": "Größe", "smtp-auth-config": { @@ -2587,4 +2586,4 @@ } }, "yesterday": "Gestern" -} +} \ No newline at end of file diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 76e4ca864..44e146a1d 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -2587,4 +2587,4 @@ } }, "yesterday": "Yesterday" -} +} \ No newline at end of file diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index e4c9a815a..48156cdc7 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -100,7 +100,6 @@ "dialog": { "title": "{type, select, add{Add new} edit{Edit} other{}} component mapping" }, - "disabled-file-options": "", "form": { "delimiter": "CSV delimiter", "delimiter-placeholder": "CSV delimiter", @@ -273,6 +272,9 @@ "watermarks": "Watermarks" }, "analysis-disabled": "Analysis disabled", + "annotation": { + "pending": "(Pending analysis)" + }, "annotation-actions": { "accept-recommendation": { "label": "Empfehlung annehmen" @@ -328,14 +330,14 @@ "error": "Rekategorisierung des Bildes gescheitert: {error}", "success": "Bild wurde einer neuen Kategorie zugeordnet." }, - "remove-hint": { - "error": "Failed to remove hint: {error}", - "success": "Hint removed!" - }, "remove": { "error": "Fehler beim Entfernen der Schwärzung: {error}", "success": "Schwärzung entfernt!" }, + "remove-hint": { + "error": "Failed to remove hint: {error}", + "success": "Hint removed!" + }, "undo": { "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "success": "erfolgreich Rückgängig gemacht" @@ -348,15 +350,15 @@ "remove-highlights": { "label": "Remove selected earmarks" }, + "resize": { + "label": "Größe ändern" + }, "resize-accept": { "label": "Größe speichern" }, "resize-cancel": { "label": "Größenänderung abbrechen" }, - "resize": { - "label": "Größe ändern" - }, "see-references": { "label": "See references" }, @@ -390,9 +392,6 @@ "skipped": "Übersprungen", "text-highlight": "Earmark" }, - "annotation": { - "pending": "(Pending analysis)" - }, "annotations": "Annotations", "archived-dossiers-listing": { "no-data": { @@ -637,14 +636,18 @@ "warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!" }, "confirmation-dialog": { + "approve-file": { + "question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?", + "title": "Warnung!" + }, "approve-file-without-analysis": { "confirmationText": "Approve without analysis", "denyText": "Cancel", "question": "Analysis required to detect new components.", "title": "Warning!" }, - "approve-file": { - "question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?", + "approve-multiple-files": { + "question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?", "title": "Warnung!" }, "approve-multiple-files-without-analysis": { @@ -653,10 +656,6 @@ "question": "Analysis required to detect new components for at least one file.", "title": "Warning" }, - "approve-multiple-files": { - "question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?", - "title": "Warnung!" - }, "assign-file-to-me": { "question": { "multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?", @@ -1026,13 +1025,13 @@ "recent": "Neu ({hours} h)", "unassigned": "Niemandem zugewiesen" }, + "reanalyse": { + "action": "Datei analysieren" + }, "reanalyse-dossier": { "error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.", "success": "Dateien für Reanalyse vorgesehen." }, - "reanalyse": { - "action": "Datei analysieren" - }, "report-download": "Report download", "start-auto-analysis": "Enable auto-analysis", "stop-auto-analysis": "Stop auto-analysis", @@ -1103,6 +1102,14 @@ "total-documents": "Anzahl der Dokumente", "total-people": "{count} {count, plural, one{user} other {users}}" }, + "dossier-templates": { + "label": "Dossier-Vorlagen", + "status": { + "active": "Active", + "inactive": "Inactive", + "incomplete": "Incomplete" + } + }, "dossier-templates-listing": { "action": { "clone": "Clone template", @@ -1137,14 +1144,6 @@ "title": "{length} dossier {length, plural, one{template} other{templates}}" } }, - "dossier-templates": { - "label": "Dossier-Vorlagen", - "status": { - "active": "Active", - "inactive": "Inactive", - "incomplete": "Incomplete" - } - }, "dossier-watermark-selector": { "heading": "Watermarks on documents", "no-watermark": "There is no watermark defined for the dossier template.
Contact your app admin to define one.", @@ -1340,6 +1339,15 @@ "title": "{length} {length, plural, one{entity} other{entities}}" } }, + "entity": { + "info": { + "actions": { + "revert": "Revert", + "save": "Save changes" + }, + "heading": "Edit entity" + } + }, "entity-rules-screen": { "error": { "generic": "Something went wrong... Entity rules update failed!" @@ -1354,28 +1362,19 @@ "warning-text": "Warning: experimental feature!", "warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules" }, - "entity": { - "info": { - "actions": { - "revert": "Revert", - "save": "Save changes" - }, - "heading": "Edit entity" - } - }, "error": { "deleted-entity": { "dossier": { "action": "Zurück zur Übersicht", "label": "Dieses Dossier wurde gelöscht!" }, - "file-dossier": { - "action": "Zurück zur Übersicht", - "label": "Das Dossier dieser Datei wurde gelöscht!" - }, "file": { "action": "Zurück zum Dossier", "label": "Diese Datei wurde gelöscht!" + }, + "file-dossier": { + "action": "Zurück zur Übersicht", + "label": "Das Dossier dieser Datei wurde gelöscht!" } }, "file-preview": { @@ -1393,6 +1392,12 @@ }, "exact-date": "{day} {month} {year} um {hour}:{minute} Uhr", "file": "Datei", + "file-attribute": { + "update": { + "error": "Failed to update file attribute value!", + "success": "File attribute value has been updated successfully!" + } + }, "file-attribute-encoding-types": { "ascii": "ASCII", "iso": "ISO-8859-1", @@ -1403,12 +1408,6 @@ "number": "Nummer", "text": "Freier Text" }, - "file-attribute": { - "update": { - "error": "Failed to update file attribute value!", - "success": "File attribute value has been updated successfully!" - } - }, "file-attributes-configurations": { "cancel": "Cancel", "form": { @@ -1551,13 +1550,13 @@ "jump-to-next": "Springe zu Nächster", "jump-to-previous": "Springe zu Vorheriger", "label": "Arbeitsvorrat", - "no-annotations": "There are no annotations for the selected component.", + "no-annotations": "There are no annotations on the selected page or for the selected component.", "page-is": "Diese Seite ist", "reset": "reset", "select": "Auswählen", "select-all": "Alle", "select-none": "Keine", - "show-skipped": "", + "show-skipped": "Show skipped in document", "the-filters": "the filters", "wrong-filters": "The selected filter combination is not possible. Please adjust or" }, @@ -1626,15 +1625,6 @@ "csv": "File attributes were imported successfully from uploaded CSV file." } }, - "filter-menu": { - "filter-options": "Filteroptionen", - "filter-types": "Filter", - "label": "Filter", - "pages-without-annotations": "Only pages without annotations", - "redaction-changes": "Nur Anmerkungen mit Schwärzungsänderungen", - "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", - "with-comments": "Nur Anmerkungen mit Kommentaren" - }, "filter": { "analysis": "Analyse erforderlich", "comment": "Kommentare", @@ -1644,6 +1634,15 @@ "redaction": "Geschwärzt", "updated": "Aktualisiert" }, + "filter-menu": { + "filter-options": "Filteroptionen", + "filter-types": "Filter", + "label": "Filter", + "pages-without-annotations": "Only pages without annotations", + "redaction-changes": "Nur Anmerkungen mit Schwärzungsänderungen", + "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", + "with-comments": "Nur Anmerkungen mit Kommentaren" + }, "filters": { "assigned-people": "Beauftragt", "documents-status": "Documents state", @@ -1922,6 +1921,13 @@ "user-promoted-to-approver": "{user} wurde im Dossier {dossierHref, select, null{{dossierName}} other{{dossierName}}} zum Genehmiger ernannt!", "user-removed-as-dossier-member": "{user} wurde als Mitglied von: {dossierHref, select, null{{dossierName}} other{{dossierName}}} entfernt!" }, + "notifications": { + "button-text": "Notifications", + "deleted-dossier": "Deleted dossier", + "label": "Benachrichtigungen", + "mark-all-as-read": "Alle als gelesen markieren", + "mark-as": "Mark as {type, select, read{read} unread{unread} other{}}" + }, "notifications-screen": { "category": { "email-notifications": "E-Mail Benachrichtigungen", @@ -1935,7 +1941,6 @@ "dossier": "Dossierbezogene Benachrichtigungen", "other": "Andere Benachrichtigungen" }, - "options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten", "options": { "ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin", "ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin", @@ -1953,6 +1958,7 @@ "USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde", "USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere" }, + "options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten", "schedule": { "daily": "Tägliche Zusammenfassung", "instant": "Sofortig", @@ -1960,13 +1966,6 @@ }, "title": "Benachrichtigungseinstellungen" }, - "notifications": { - "button-text": "Notifications", - "deleted-dossier": "Deleted dossier", - "label": "Benachrichtigungen", - "mark-all-as-read": "Alle als gelesen markieren", - "mark-as": "Mark as {type, select, read{read} unread{unread} other{}}" - }, "ocr": { "confirmation-dialog": { "cancel": "Cancel", @@ -2058,16 +2057,16 @@ "warnings-label": "Prompts and dialogs", "warnings-subtitle": "Do not show again options" }, + "processing": { + "basic": "Processing", + "ocr": "OCR" + }, "processing-status": { "ocr": "OCR", "pending": "Pending", "processed": "Processed", "processing": "Processing" }, - "processing": { - "basic": "Processing", - "ocr": "OCR" - }, "readonly": "Lesemodus", "readonly-archived": "Read only (archived)", "redact-text": { @@ -2303,6 +2302,12 @@ "red-user-admin": "Benutzer-Admin", "regular": "Regulär" }, + "search": { + "active-dossiers": "ganze Plattform", + "all-dossiers": "all documents", + "placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen", + "this-dossier": "in diesem Dossier" + }, "search-screen": { "cols": { "assignee": "Bevollmächtigter", @@ -2326,12 +2331,6 @@ "no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.", "table-header": "{length} search {length, plural, one{result} other{results}}" }, - "search": { - "active-dossiers": "ganze Plattform", - "all-dossiers": "all documents", - "placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen", - "this-dossier": "in diesem Dossier" - }, "seconds": "seconds", "size": "Size", "smtp-auth-config": { @@ -2587,4 +2586,4 @@ } }, "yesterday": "Gestern" -} +} \ No newline at end of file diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index fc915a503..9eca37841 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -1551,13 +1551,13 @@ "jump-to-next": "Jump to next", "jump-to-previous": "Jump to previous", "label": "Workload", - "no-annotations": "There are no annotations for the selected component.", + "no-annotations": "There are no annotations on the selected page or for the selected component.", "page-is": "This page is", "reset": "reset", "select": "Select", "select-all": "All", "select-none": "None", - "show-skipped": "", + "show-skipped": "Show skipped in document", "the-filters": "the filters", "wrong-filters": "The selected filter combination is not possible. Please adjust or" }, @@ -2587,4 +2587,4 @@ } }, "yesterday": "Yesterday" -} +} \ No newline at end of file From 4f955bcd50360bb88be9632d403835011d3269f5 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Fri, 9 Aug 2024 08:58:36 +0300 Subject: [PATCH 4/7] RED-9788 - Adapt Annotation column to display only annotations per component if component is selected --- .../file-workload.component.html | 33 ++++++++----------- .../file-workload/file-workload.component.ts | 15 +++++---- .../services/annotation-processing.service.ts | 19 ----------- .../paginator/paginator.component.html | 6 +++- .../paginator/paginator.component.scss | 4 +++ .../paginator/paginator.component.ts | 7 +++- .../pdf-viewer/pdf-viewer.component.html | 2 +- apps/red-ui/src/styles.scss | 12 ++++--- libs/common-ui | 2 +- 9 files changed, 45 insertions(+), 55 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html index ce6756679..531d15776 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html @@ -185,26 +185,19 @@ >. - - {{ 'file-preview.tabs.annotations.no-annotations' | translate }} - - - {{ 'file-preview.tabs.annotations.wrong-filters' | translate }} - - {{ 'file-preview.tabs.annotations.the-filters' | translate }} - + @if ((fileDataService.allLength$ | async) > 0 && displayedPages.length === 0) { + @if (this.enabledFilters?.length) { + {{ 'file-preview.tabs.annotations.wrong-filters' | translate }} + + {{ 'file-preview.tabs.annotations.the-filters' | translate }} + } @else if (state.componentReferenceIds?.length === 0) { + {{ 'file-preview.tabs.annotations.no-annotations' | translate }} + } + }
diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts index 0f0c47c83..3bc1ba7b9 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts @@ -90,9 +90,10 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On protected readonly currentPageIsExcluded = computed(() => this.state.file().excludedPages.includes(this.pdf.currentPage())); protected readonly translations = workloadTranslations; protected readonly isDocumine = getConfig().IS_DOCUMINE; - displayedAnnotations = new Map(); - displayedPages: number[] = []; - pagesPanelActive = true; + protected displayedAnnotations = new Map(); + protected displayedPages: number[] = []; + protected pagesPanelActive = true; + protected enabledFilters = []; constructor( readonly filterService: FilterService, @@ -425,15 +426,15 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On this.displayedAnnotations = this._annotationProcessingService.filterAndGroupAnnotations(annotations, primary, secondary); const pagesThatDisplayAnnotations = [...this.displayedAnnotations.keys()]; - const enabledFilters = this.filterService.enabledFlatFilters; - if (enabledFilters.some(f => f.id === 'pages-without-annotations')) { - if (enabledFilters.length === 1 && !onlyPageWithAnnotations) { + this.enabledFilters = this.filterService.enabledFlatFilters; + if (this.enabledFilters.some(f => f.id === 'pages-without-annotations')) { + if (this.enabledFilters.length === 1 && !onlyPageWithAnnotations) { this.displayedPages = this.#allPages.filter(page => !pagesThatDisplayAnnotations.includes(page)); } else { this.displayedPages = []; } this.displayedAnnotations.clear(); - } else if (enabledFilters.length || onlyPageWithAnnotations || componentReferenceIds) { + } else if (this.enabledFilters.length || onlyPageWithAnnotations || componentReferenceIds) { this.displayedPages = pagesThatDisplayAnnotations; } else { this.displayedPages = this.#allPages; diff --git a/apps/red-ui/src/app/modules/file-preview/services/annotation-processing.service.ts b/apps/red-ui/src/app/modules/file-preview/services/annotation-processing.service.ts index 253b63f4c..e453fb37d 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/annotation-processing.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/annotation-processing.service.ts @@ -141,10 +141,6 @@ export class AnnotationProcessingService { } } - if (this.#isDocumine) { - this.#createNoAnnotationsFilter(filterMap, filters); - } - return filters.sort((a, b) => SuperTypeSorter[a.id] - SuperTypeSorter[b.id]); } @@ -272,19 +268,4 @@ export class AnnotationProcessingService { return first.pageNumber < second.pageNumber ? -1 : 1; }); } - - #createNoAnnotationsFilter(filterMap: Map, filters: INestedFilter[]) { - const childFilter: IFilter = { - id: 'no-annotations-filter', - label: 'no-annotations-filter', - checked: false, - matches: 1, - skipTranslation: true, - hidden: true, - }; - - const newChildFilter = new Filter(childFilter); - filterMap.set('no-annotations-filter', newChildFilter); - filters[0]?.children.push(newChildFilter); - } } diff --git a/apps/red-ui/src/app/modules/pdf-viewer/components/paginator/paginator.component.html b/apps/red-ui/src/app/modules/pdf-viewer/components/paginator/paginator.component.html index 221d497fe..006a7bc77 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/components/paginator/paginator.component.html +++ b/apps/red-ui/src/app/modules/pdf-viewer/components/paginator/paginator.component.html @@ -1,4 +1,8 @@ -