fixed bugs
This commit is contained in:
parent
bad4d05ec0
commit
6bbf300168
@ -110,7 +110,7 @@ export class DialogService {
|
||||
ref.afterClosed().subscribe((result) => {
|
||||
if (result) {
|
||||
this._manualAnnotationService
|
||||
.acceptSuggestion(annotation.id)
|
||||
.approveRequest(annotation.id)
|
||||
.subscribe((acceptResult) => {
|
||||
if (callback) {
|
||||
callback(acceptResult);
|
||||
@ -136,7 +136,7 @@ export class DialogService {
|
||||
|
||||
ref.afterClosed().subscribe((result) => {
|
||||
if (result) {
|
||||
this._manualAnnotationService.rejectSuggestion(annotation).subscribe(() => {
|
||||
this._manualAnnotationService.declineOrRemoveRequest(annotation).subscribe(() => {
|
||||
rejectCallback();
|
||||
});
|
||||
}
|
||||
|
||||
@ -60,34 +60,18 @@ export class ManualAnnotationDialogComponent implements OnInit {
|
||||
|
||||
handleAddRedaction() {
|
||||
this._enhanceManualRedaction(this.manualRedactionEntryWrapper.manualRedactionEntry);
|
||||
|
||||
if (this.isDictionaryRequest) {
|
||||
this._manualAnnotationService
|
||||
.makeDictionaryEntry(this.manualRedactionEntryWrapper.manualRedactionEntry)
|
||||
.subscribe(
|
||||
(response) => {
|
||||
this.dialogRef.close(
|
||||
new ManualAnnotationResponse(this.manualRedactionEntryWrapper, response)
|
||||
);
|
||||
},
|
||||
() => {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
);
|
||||
} else {
|
||||
this._manualAnnotationService
|
||||
.makeRedaction(this.manualRedactionEntryWrapper.manualRedactionEntry)
|
||||
.subscribe(
|
||||
(response) => {
|
||||
this.dialogRef.close(
|
||||
new ManualAnnotationResponse(this.manualRedactionEntryWrapper, response)
|
||||
);
|
||||
},
|
||||
() => {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
);
|
||||
}
|
||||
this._manualAnnotationService
|
||||
.addAnnotation(this.manualRedactionEntryWrapper.manualRedactionEntry)
|
||||
.subscribe(
|
||||
(response) => {
|
||||
this.dialogRef.close(
|
||||
new ManualAnnotationResponse(this.manualRedactionEntryWrapper, response)
|
||||
);
|
||||
},
|
||||
() => {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
get title() {
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
<div
|
||||
[class.visible]="isAnnotationMenuOpen()"
|
||||
*ngIf="canPerformAnnotationActions"
|
||||
class="annotation-actions"
|
||||
>
|
||||
<div [class.visible]="menuOpen" *ngIf="canPerformAnnotationActions" class="annotation-actions">
|
||||
<button
|
||||
(click)="openAcceptSuggestionMenu($event)"
|
||||
*ngIf="canAcceptSuggestion"
|
||||
[class.active]="isAnnotationMenuOpen()"
|
||||
[class.active]="menuOpen"
|
||||
[matMenuTriggerFor]="menu"
|
||||
class="confirm"
|
||||
mat-icon-button
|
||||
|
||||
@ -21,10 +21,6 @@ export class AnnotationActionsComponent implements OnInit {
|
||||
this.suggestionType = this.appStateService.getDictionaryTypeValue('suggestion');
|
||||
}
|
||||
|
||||
public isAnnotationMenuOpen() {
|
||||
return this.annotation.id === this.activeMenuAnnotation?.id;
|
||||
}
|
||||
|
||||
get canAcceptSuggestion() {
|
||||
return (
|
||||
this.appStateService.isActiveProjectOwnerAndManager &&
|
||||
@ -33,8 +29,6 @@ export class AnnotationActionsComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
onSuggestionMenuClose() {}
|
||||
|
||||
acceptSuggestion($event: MouseEvent, annotation: AnnotationWrapper) {
|
||||
$event.stopPropagation();
|
||||
}
|
||||
@ -47,8 +41,6 @@ export class AnnotationActionsComponent implements OnInit {
|
||||
$event.stopPropagation();
|
||||
}
|
||||
|
||||
openAcceptSuggestionMenu($event: MouseEvent, annotation: AnnotationWrapper) {}
|
||||
|
||||
public openAcceptSuggestionMenu($event: MouseEvent) {
|
||||
$event.preventDefault();
|
||||
this.menuOpen = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user