simplified annotation flow

This commit is contained in:
Timo Bejan 2021-08-13 15:55:16 +03:00
parent bb719a224a
commit 13172a6a55
4 changed files with 30 additions and 8 deletions

View File

@ -234,11 +234,6 @@ export class AnnotationWrapper {
return;
}
if (redactionLogEntryWrapper.status === 'DECLINED') {
annotationWrapper.superType = 'declined-suggestion';
return;
}
if (redactionLogEntryWrapper.manualRedactionType === 'FORCE_REDACT') {
annotationWrapper.force = true;
@ -261,6 +256,10 @@ export class AnnotationWrapper {
annotationWrapper.superType = 'add-dictionary';
return;
}
if (redactionLogEntryWrapper.status === 'DECLINED') {
annotationWrapper.superType = 'declined-suggestion';
return;
}
if (!redactionLogEntryWrapper.manual) {
annotationWrapper.superType = 'skipped';
}
@ -276,6 +275,10 @@ export class AnnotationWrapper {
annotationWrapper.superType = 'manual-redaction';
return;
}
if (redactionLogEntryWrapper.status === 'DECLINED') {
annotationWrapper.superType = 'declined-suggestion';
return;
}
}
if (redactionLogEntryWrapper.manualRedactionType === 'LEGAL_BASIS_CHANGE') {
@ -308,6 +311,10 @@ export class AnnotationWrapper {
annotationWrapper.superType = 'add-dictionary';
return;
}
if (redactionLogEntryWrapper.status === 'DECLINED') {
annotationWrapper.superType = 'declined-suggestion';
return;
}
} else {
if (redactionLogEntryWrapper.status === 'REQUESTED') {
annotationWrapper.superType = 'suggestion-add';
@ -317,6 +324,10 @@ export class AnnotationWrapper {
annotationWrapper.superType = 'manual-redaction';
return;
}
if (redactionLogEntryWrapper.status === 'DECLINED') {
annotationWrapper.superType = 'declined-suggestion';
return;
}
}
}

View File

@ -71,6 +71,7 @@ export class FileDataModel {
redactionLogEntryWrapper.isChangeLogEntry = true;
redactionLogEntryWrapper.changeLogType = changeLogEntry.changeType;
redactionLogEntryWrapper.id = 'changed-log-removed-' + redactionLogEntryWrapper.id;
result.push(redactionLogEntryWrapper);
}
});
@ -90,7 +91,17 @@ export class FileDataModel {
Object.assign(redactionLogEntryWrapper, redactionLogEntry);
redactionLogEntryWrapper.isChangeLogEntry = !!existingChangeLogEntry;
redactionLogEntryWrapper.changeLogType = 'ADDED';
result.push(redactionLogEntryWrapper);
if (
redactionLogEntryWrapper.status === 'DECLINED' &&
redactionLogEntryWrapper.manualRedactionType === 'ADD' &&
redactionLogEntryWrapper.type === 'false_positive'
) {
// ignore these
return;
} else {
result.push(redactionLogEntryWrapper);
}
});
result = result.filter(r => reasonAnnotationIds.indexOf(r.id) < 0);

View File

@ -41,7 +41,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.reject-suggestion' | translate"
[type]="buttonType"
icon="red:trash"
icon="red:close"
></iqser-circle-button>
<iqser-circle-button

View File

@ -236,7 +236,7 @@ export class AnnotationActionsService {
if (canRejectSuggestion) {
availableActions.push({
type: 'actionButton',
img: this._convertPath('/assets/icons/general/trash.svg'),
img: this._convertPath('/assets/icons/general/close.svg'),
title: this._translateService.instant('annotation-actions.reject-suggestion'),
onClick: () => {
this._ngZone.run(() => {