manual redactions flow
This commit is contained in:
parent
3432d2e6e3
commit
44ad0d6c64
@ -31,16 +31,16 @@ export class AnnotationActionsComponent implements OnInit {
|
||||
}
|
||||
|
||||
get canAcceptSuggestion() {
|
||||
return this.permissionsService.isManagerAndOwner() && this.annotation.isSuggestion;
|
||||
return this.permissionsService.isManagerAndOwner() && (this.annotation.isSuggestion || this.annotation.isDeclinedSuggestion);
|
||||
}
|
||||
|
||||
get canRejectSuggestion() {
|
||||
// i can reject whatever i may not undo
|
||||
return this.canAcceptSuggestion && !this.canUndoAnnotation;
|
||||
return this.canAcceptSuggestion && !this.annotation.isDeclinedSuggestion && !this.canUndoAnnotation;
|
||||
}
|
||||
|
||||
get canDirectlySuggestToRemoveAnnotation() {
|
||||
return this.annotation.isHint;
|
||||
return this.annotation.isHint || this.annotation.isManual;
|
||||
}
|
||||
|
||||
get requiresSuggestionRemoveMenu() {
|
||||
|
||||
@ -372,10 +372,12 @@ export class FilePreviewScreenComponent implements OnInit {
|
||||
this._fileDownloadService.loadActiveFileManualAnnotations().subscribe((manualRedactions) => {
|
||||
this.fileData.manualRedactions = manualRedactions;
|
||||
this._rebuildFilters();
|
||||
this._annotationDrawService.drawAnnotations(
|
||||
this.instance,
|
||||
this.annotations.filter((item) => (annotationIdToDraw ? item.id === annotationIdToDraw : true))
|
||||
);
|
||||
if (!this.redactedView) {
|
||||
this._annotationDrawService.drawAnnotations(
|
||||
this.instance,
|
||||
this.annotations.filter((item) => (annotationIdToDraw ? item.id === annotationIdToDraw : true))
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -35,12 +35,17 @@ export class AnnotationWrapper {
|
||||
pageNumber: number;
|
||||
hint: boolean;
|
||||
redaction: boolean;
|
||||
status: string;
|
||||
positions: Rectangle[];
|
||||
|
||||
get isIgnored() {
|
||||
return this.superType === 'ignore';
|
||||
}
|
||||
|
||||
get isManual() {
|
||||
return this.superType === 'manual';
|
||||
}
|
||||
|
||||
get isRedactedOrIgnored() {
|
||||
return this.superType === 'ignore' || this.superType === 'redaction';
|
||||
}
|
||||
@ -53,6 +58,10 @@ export class AnnotationWrapper {
|
||||
return this.superType === 'add-dictionary' || this.superType === 'remove-dictionary';
|
||||
}
|
||||
|
||||
get isApproved() {
|
||||
return this.status === 'APPROVED';
|
||||
}
|
||||
|
||||
get isHint() {
|
||||
return this.superType === 'hint';
|
||||
}
|
||||
@ -100,6 +109,7 @@ export class AnnotationWrapper {
|
||||
annotationWrapper.pageNumber = redactionLogEntry.positions[0]?.page;
|
||||
annotationWrapper.positions = redactionLogEntry.positions;
|
||||
annotationWrapper.content = AnnotationWrapper.createContent(redactionLogEntry);
|
||||
annotationWrapper.status = redactionLogEntry.status;
|
||||
} else {
|
||||
// no redaction log entry - not yet processed
|
||||
const dictionary = dictionaryData[manualRedactionEntry.type];
|
||||
@ -117,7 +127,7 @@ export class AnnotationWrapper {
|
||||
|
||||
AnnotationWrapper._setSuperType(annotationWrapper, redactionLogEntry, manualRedactionEntry, idRemoval);
|
||||
|
||||
annotationWrapper.typeLabel = annotationWrapper.superType;
|
||||
annotationWrapper.typeLabel = 'annotation-type.' + annotationWrapper.superType;
|
||||
return annotationWrapper;
|
||||
}
|
||||
|
||||
|
||||
@ -41,7 +41,11 @@ export class FileDataModel {
|
||||
pair.comments
|
||||
);
|
||||
if (annotation) {
|
||||
annotations.push(annotation);
|
||||
if (annotation.isReadyForAnalysis && annotation.isApproved) {
|
||||
//
|
||||
} else {
|
||||
annotations.push(annotation);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -64,15 +68,17 @@ export class FileDataModel {
|
||||
|
||||
this.manualRedactions.entriesToAdd.forEach((eta) => {
|
||||
// only not declined
|
||||
const redactionLogEntry = this.redactionLog.redactionLogEntry.find((rdl) => rdl.id === eta.id);
|
||||
if (!redactionLogEntry) {
|
||||
pairs.push({
|
||||
redactionLogEntry: null,
|
||||
manualRedactionEntry: eta,
|
||||
// only not declined
|
||||
idRemoval: this.manualRedactions.idsToRemove.find((idr) => idr.id === eta.id),
|
||||
comments: this.manualRedactions.comments[eta.id]
|
||||
});
|
||||
if (new Date(eta.processedDate).getTime() > new Date(this.fileStatus.lastProcessed).getTime() || !eta.processedDate) {
|
||||
const redactionLogEntry = this.redactionLog.redactionLogEntry.find((rdl) => rdl.id === eta.id);
|
||||
if (!redactionLogEntry) {
|
||||
pairs.push({
|
||||
redactionLogEntry: null,
|
||||
manualRedactionEntry: eta,
|
||||
// only not declined
|
||||
idRemoval: this.manualRedactions.idsToRemove.find((idr) => idr.id === eta.id),
|
||||
comments: this.manualRedactions.comments[eta.id]
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ export class FileDownloadService {
|
||||
map((data) => {
|
||||
const fileData = new FileDataModel(this._appStateService.activeFile, ...data);
|
||||
// lazy load redacted data
|
||||
this.loadFile('REDACTED', this._appStateService.activeFileId).subscribe((redactedFileData) => (fileData.redactedFileData = redactedFileData));
|
||||
this.loadFile('ANNOTATED', this._appStateService.activeFileId).subscribe((redactedFileData) => (fileData.redactedFileData = redactedFileData));
|
||||
return fileData;
|
||||
})
|
||||
);
|
||||
|
||||
@ -60,6 +60,10 @@ export class AppStateService {
|
||||
activeFile: null
|
||||
};
|
||||
|
||||
this._dictionaryControllerService.getDictionaryForType('hint_only').subscribe((data) => {
|
||||
console.log(data);
|
||||
});
|
||||
|
||||
timer(5000, 5000)
|
||||
.pipe(
|
||||
tap(() => {
|
||||
|
||||
@ -344,16 +344,16 @@
|
||||
"hints": "Hint Dictionaries"
|
||||
},
|
||||
"annotation-type": {
|
||||
"suggestion": "Suggestion",
|
||||
"suggestion-remove": "Suggestion removal",
|
||||
"suggestion-redaction": "Suggested redaction add",
|
||||
"suggestion-remove-redaction": "Suggested redaction removal",
|
||||
"suggestion-redaction-dictionary": "Suggested dictionary add (redaction)",
|
||||
"suggestion-remove-redaction-dictionary": "Suggested dictionary removal (redaction)",
|
||||
"suggestion-hint": "Suggested dictionary add (hint)",
|
||||
"suggestion-remove-hint": "Suggested dictionary removal (hint)",
|
||||
"add-dictionary": "Pending add to dictionary",
|
||||
"remove-dictionary": "Pending remove from dictionary",
|
||||
"suggestion-add-dictionary": "Suggested dictionary add",
|
||||
"suggestion-remove-dictionary": "Suggested dictionary removal",
|
||||
"suggestion-add": "Suggested manual redaction",
|
||||
"suggestion-remove": "Suggested redaction removal",
|
||||
"ignore": "Ignore",
|
||||
"hint": "Hint",
|
||||
"redaction": "Redaction"
|
||||
"redaction": "Redaction",
|
||||
"manual": "Manual Redaction",
|
||||
"declined-suggestion": "Declined Suggestion"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user