corner case handling for recommendations
This commit is contained in:
parent
92d3b866ce
commit
adeb4885ff
@ -164,9 +164,10 @@ export class AnnotationWrapper {
|
||||
annotationWrapper.textAfter = redactionLogEntry.textAfter;
|
||||
annotationWrapper.dictionaryOperation = redactionLogEntry.dictionaryEntry;
|
||||
annotationWrapper.userId = redactionLogEntry.userId;
|
||||
annotationWrapper.content = AnnotationWrapper._createContent(redactionLogEntry);
|
||||
AnnotationWrapper._setSuperType(annotationWrapper, redactionLogEntry);
|
||||
AnnotationWrapper._handleRecommendations(annotationWrapper, redactionLogEntry);
|
||||
|
||||
AnnotationWrapper._createContent(annotationWrapper, redactionLogEntry);
|
||||
annotationWrapper.typeLabel = 'annotation-type.' + annotationWrapper.superType;
|
||||
|
||||
return annotationWrapper;
|
||||
@ -225,7 +226,7 @@ export class AnnotationWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
private static _createContent(entry: any) {
|
||||
private static _createContent(annotationWrapper: AnnotationWrapper, entry: RedactionLogEntryWrapper) {
|
||||
let content = '';
|
||||
if (entry.matchedRule) {
|
||||
content += 'Rule ' + entry.matchedRule + ' matched \n\n';
|
||||
@ -239,6 +240,6 @@ export class AnnotationWrapper {
|
||||
if (entry.section) {
|
||||
content += 'In section: "' + entry.section + '"';
|
||||
}
|
||||
return content;
|
||||
annotationWrapper.content = content;
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,6 +95,10 @@ export class FileDataModel {
|
||||
redactionLogEntryWrapper.manualRedactionType = 'ADD';
|
||||
redactionLogEntryWrapper.manual = true;
|
||||
redactionLogEntryWrapper.comments = this.manualRedactions.comments[redactionLogEntryWrapper.id];
|
||||
if (!!markedAsReasonRedactionLogEntry) {
|
||||
// cleanup reason if the reason is another annotationId - it is not needed for drawing
|
||||
redactionLogEntryWrapper.reason = null;
|
||||
}
|
||||
|
||||
result.push(redactionLogEntryWrapper);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user