annotation processing

This commit is contained in:
Timo Bejan 2020-10-30 12:59:21 +02:00
parent 28a2ecb2ce
commit 345d58d7be
4 changed files with 18 additions and 6 deletions

View File

@ -117,7 +117,8 @@ export class DialogService {
public rejectSuggestion( public rejectSuggestion(
$event: MouseEvent, $event: MouseEvent,
annotation: AnnotationWrapper annotation: AnnotationWrapper,
rejectCallback: () => void
): MatDialogRef<ConfirmationDialogComponent> { ): MatDialogRef<ConfirmationDialogComponent> {
$event.stopPropagation(); $event.stopPropagation();
@ -128,7 +129,9 @@ export class DialogService {
ref.afterClosed().subscribe((result) => { ref.afterClosed().subscribe((result) => {
if (result) { if (result) {
this._manualAnnotationService.rejectSuggestion(annotation).subscribe(() => {}); this._manualAnnotationService.rejectSuggestion(annotation).subscribe(() => {
rejectCallback();
});
} }
}); });

View File

@ -271,7 +271,10 @@ export class FilePreviewScreenComponent implements OnInit {
public rejectSuggestion($event: MouseEvent, annotation: AnnotationWrapper) { public rejectSuggestion($event: MouseEvent, annotation: AnnotationWrapper) {
this.ngZone.run(() => { this.ngZone.run(() => {
this._dialogRef = this._dialogService.rejectSuggestion($event, annotation); this._dialogRef = this._dialogService.rejectSuggestion($event, annotation, () => {
console.log('Reject Callback');
this.activeViewer.annotManager.deleteAnnotation(annotation.annotation, false, true);
});
}); });
} }

View File

@ -125,9 +125,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges {
this._configureTextPopup(); this._configureTextPopup();
this._configureHeader(); this._configureHeader();
instance.annotManager.on('annotationChanged', (annotations, action) => { instance.annotManager.on('annotationChanged', (annotations, action) => {
if (action === 'add') { this._annotationEventDebouncer.next(annotations);
this._annotationEventDebouncer.next(annotations);
}
}); });
instance.annotManager.on('annotationSelected', (annotationList, action) => { instance.annotManager.on('annotationSelected', (annotationList, action) => {

View File

@ -26,6 +26,10 @@ export interface FileStatus {
* The current reviewer's (if any) user id. * The current reviewer's (if any) user id.
*/ */
currentReviewer?: string; currentReviewer?: string;
/**
* Shows which dictionary versions was used during the analysis.
*/
dictionaryVersion?: number;
/** /**
* The ID of the file. * The ID of the file.
*/ */
@ -62,6 +66,10 @@ export interface FileStatus {
* The ID of the project the file belongs to. * The ID of the project the file belongs to.
*/ */
projectId?: string; projectId?: string;
/**
* Shows which rules versions was used during the analysis.
*/
rulesVersion?: number;
/** /**
* The status of the file with regard to its analysis an review processes. * The status of the file with regard to its analysis an review processes.
*/ */