This commit is contained in:
Adina Țeudan 2021-06-29 11:56:27 +03:00
parent 2767809cd2
commit 55b29adce8
2 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import { UserWrapper } from '@services/user.service';
import { AnnotationWrapper } from './annotation.wrapper';
export class AnnotationPerimssions {
export class AnnotationPermissions {
canUndo: boolean;
canAcceptRecommendation: boolean;
@ -16,6 +16,8 @@ export class AnnotationPerimssions {
canForceRedaction: boolean;
canChangeLegalBasis: boolean;
get canPerformMultipleRemoveActions() {
return (
<any>this.canMarkTextOnlyAsFalsePositive +
@ -59,6 +61,8 @@ export class AnnotationPerimssions {
!permissions.canUndo &&
annotation.superType !== 'pending-analysis'));
permissions.canChangeLegalBasis = !!annotation.legalBasis;
return permissions;
}
}

View File

@ -37,6 +37,7 @@ export class AnnotationWrapper {
dictionaryOperation: boolean;
positions: Rectangle[];
recommendationType: string;
legalBasis: string;
image?: boolean;
force?: boolean;
@ -227,6 +228,7 @@ export class AnnotationWrapper {
annotationWrapper.userId = redactionLogEntry.userId;
annotationWrapper.image = redactionLogEntry.image;
annotationWrapper.comments = redactionLogEntry.comments || [];
annotationWrapper.legalBasis = redactionLogEntry.legalBasis;
AnnotationWrapper._createContent(annotationWrapper, redactionLogEntry);
AnnotationWrapper._setSuperType(annotationWrapper, redactionLogEntry);
AnnotationWrapper._handleSkippedState(annotationWrapper, redactionLogEntry);