From e1d89ea4f2df6478baab62c5f1f6d79a8083b8fb Mon Sep 17 00:00:00 2001 From: Timo Date: Tue, 27 Apr 2021 16:32:34 +0300 Subject: [PATCH] False positive ist no longer virtual --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 2 +- .../dictionary-listing/dictionary-listing-screen.component.ts | 2 +- apps/red-ui/src/app/state/app-state.service.ts | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index d3f6dcda4..6fb4338b6 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -79,7 +79,7 @@ export class AnnotationWrapper { } get canBeMarkedAsFalsePositive() { - return this.superType === 'redaction' && (this.hasTextAfter || this.hasTextBefore) && !this.isImage; + return (this.isRecommendation || this.superType === 'redaction') && (this.hasTextAfter || this.hasTextBefore) && !this.isImage; } get canBeMarkedAsFalsePositiveWithTextOnly() { diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.ts index e9b951c22..a7deb42d2 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.ts @@ -42,7 +42,7 @@ export class DictionaryListingScreenComponent extends BaseListingComponent appStateDictionaryData[key]) - .filter((d) => !d.virtual || d.type === 'false_positive'); + .filter((d) => !d.virtual); this.displayedEntities = [...this.allEntities]; const dataObs = this.allEntities.map((dict) => this._dictionaryControllerService.getDictionaryForType(dict.type, this._appStateService.activeRuleSetId).pipe( diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts index 133fc1eb3..ef71d7536 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -509,7 +509,6 @@ export class AppStateService { tap((typesResponse) => { for (const type of typesResponse.types) { dictionaryData[type.type] = type; - dictionaryData[type.type].virtual = type.type === 'false_positive'; dictionaryData[type.type].label = humanize(type.type, false); } })