fixed some critical bugs
This commit is contained in:
parent
1883c0eb20
commit
770374ea61
@ -136,6 +136,7 @@
|
||||
<!-- exclude from redaction -->
|
||||
<div class="red-input-group">
|
||||
<mat-slide-toggle
|
||||
(click)="$event.stopPropagation()"
|
||||
(change)="toggleAnalysis()"
|
||||
[checked]="!fileStatus?.isExcluded"
|
||||
[class.mr-24]="screen === 'dossier-overview'"
|
||||
|
||||
@ -72,7 +72,7 @@ export class FileWorkloadComponent {
|
||||
private _multiSelectActive = false;
|
||||
|
||||
get isProcessing(): boolean {
|
||||
return this.fileData.fileStatus.isProcessing;
|
||||
return this.fileData.fileStatus?.isProcessing;
|
||||
}
|
||||
|
||||
get activeAnnotationsLength(): number | undefined {
|
||||
|
||||
@ -422,6 +422,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
|
||||
}
|
||||
|
||||
async annotationsChangedByReviewAction(annotation: AnnotationWrapper) {
|
||||
console.log(annotation);
|
||||
await this._cleanupAndRedrawManualAnnotationsForEntirePage(annotation.pageNumber);
|
||||
}
|
||||
|
||||
|
||||
@ -165,6 +165,25 @@ export class AnnotationActionsService {
|
||||
)
|
||||
}));
|
||||
|
||||
const canRemoveOrSuggestToRemoveFromDictionary = annotationPermissions.reduce(
|
||||
(acc, next) => acc && next.permissions.canRemoveOrSuggestToRemoveFromDictionary,
|
||||
true
|
||||
);
|
||||
if (canRemoveOrSuggestToRemoveFromDictionary) {
|
||||
availableActions.push({
|
||||
type: 'actionButton',
|
||||
img: this._convertPath('/assets/icons/general/remove-from-dict.svg'),
|
||||
title: this._translateService.instant(
|
||||
'annotation-actions.remove-annotation.remove-from-dict'
|
||||
),
|
||||
onClick: () => {
|
||||
this._ngZone.run(() => {
|
||||
this.suggestRemoveAnnotation(null, annotations, true, annotationsChanged);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const canAcceptRecommendation = annotationPermissions.reduce(
|
||||
(acc, next) => acc && next.permissions.canAcceptRecommendation,
|
||||
true
|
||||
@ -286,9 +305,7 @@ export class AnnotationActionsService {
|
||||
availableActions.push({
|
||||
type: 'actionButton',
|
||||
img: this._convertPath('/assets/icons/general/trash.svg'),
|
||||
title: this._translateService.instant(
|
||||
'annotation-actions.suggest-remove-annotation'
|
||||
),
|
||||
title: this._translateService.instant('remove-annotation.only-here'),
|
||||
onClick: () => {
|
||||
this._ngZone.run(() => {
|
||||
this.suggestRemoveAnnotation(null, annotations, false, annotationsChanged);
|
||||
@ -297,25 +314,6 @@ export class AnnotationActionsService {
|
||||
});
|
||||
}
|
||||
|
||||
const canRemoveOrSuggestToRemoveFromDictionary = annotationPermissions.reduce(
|
||||
(acc, next) => acc && next.permissions.canRemoveOrSuggestToRemoveFromDictionary,
|
||||
true
|
||||
);
|
||||
if (canRemoveOrSuggestToRemoveFromDictionary) {
|
||||
availableActions.push({
|
||||
type: 'actionButton',
|
||||
img: this._convertPath('/assets/icons/general/trash.svg'),
|
||||
title: this._translateService.instant(
|
||||
'annotation-actions.remove-annotation.remove-from-dict'
|
||||
),
|
||||
onClick: () => {
|
||||
this._ngZone.run(() => {
|
||||
this.suggestRemoveAnnotation(null, annotations, true, annotationsChanged);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return availableActions;
|
||||
}
|
||||
|
||||
|
||||
@ -33,8 +33,8 @@ export class FileActionService {
|
||||
fileStatusWrapper = this._appStateService.activeFile;
|
||||
}
|
||||
return this._reanalysisControllerService.toggleAnalysis(
|
||||
fileStatusWrapper.fileId,
|
||||
fileStatusWrapper.dossierId,
|
||||
fileStatusWrapper.fileId,
|
||||
!fileStatusWrapper.isExcluded
|
||||
);
|
||||
}
|
||||
@ -112,8 +112,8 @@ export class FileActionService {
|
||||
|
||||
return this._statusControllerService.setStatusUnderApprovalForList(
|
||||
fileStatus.map(f => f.fileId),
|
||||
this._appStateService.activeDossierId,
|
||||
approverId
|
||||
approverId,
|
||||
this._appStateService.activeDossierId
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -107,9 +107,9 @@ export class ManualAnnotationService {
|
||||
undoRequest(annotationWrapper: AnnotationWrapper) {
|
||||
return this._manualRedactionControllerService
|
||||
.undo(
|
||||
annotationWrapper.id,
|
||||
this._appStateService.activeDossierId,
|
||||
this._appStateService.activeFileId,
|
||||
annotationWrapper.id
|
||||
this._appStateService.activeFileId
|
||||
)
|
||||
.pipe(
|
||||
tap(
|
||||
@ -286,8 +286,8 @@ export class ManualAnnotationService {
|
||||
return this._manualRedactionControllerService
|
||||
.requestForceRedaction(
|
||||
forceRedactionRequest,
|
||||
this._appStateService.activeDossier.dossier.dossierId,
|
||||
this._appStateService.activeFile.fileId
|
||||
this._appStateService.activeDossierId,
|
||||
this._appStateService.activeFileId
|
||||
)
|
||||
.pipe(
|
||||
tap(
|
||||
@ -306,8 +306,8 @@ export class ManualAnnotationService {
|
||||
return this._manualRedactionControllerService
|
||||
.forceRedaction(
|
||||
forceRedactionRequest,
|
||||
this._appStateService.activeDossier.dossier.dossierId,
|
||||
this._appStateService.activeFile.fileId
|
||||
this._appStateService.activeDossierId,
|
||||
this._appStateService.activeFileId
|
||||
)
|
||||
.pipe(
|
||||
tap(
|
||||
@ -326,8 +326,8 @@ export class ManualAnnotationService {
|
||||
return this._manualRedactionControllerService
|
||||
.requestAddRedaction(
|
||||
manualRedactionEntry,
|
||||
this._appStateService.activeDossier.dossier.dossierId,
|
||||
this._appStateService.activeFile.fileId
|
||||
this._appStateService.activeDossierId,
|
||||
this._appStateService.activeFileId
|
||||
)
|
||||
.pipe(
|
||||
tap(
|
||||
@ -349,8 +349,8 @@ export class ManualAnnotationService {
|
||||
return this._manualRedactionControllerService
|
||||
.addRedaction(
|
||||
manualRedactionEntry,
|
||||
this._appStateService.activeDossier.dossier.dossierId,
|
||||
this._appStateService.activeFile.fileId
|
||||
this._appStateService.activeDossierId,
|
||||
this._appStateService.activeFileId
|
||||
)
|
||||
.pipe(
|
||||
tap(
|
||||
|
||||
@ -23,6 +23,10 @@ export class UserWrapper {
|
||||
: this._currentUser.username;
|
||||
}
|
||||
|
||||
get username() {
|
||||
return this.email || this.userId;
|
||||
}
|
||||
|
||||
get userId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user