RED-8072 - Do not allow any annotations or annotation changes while auto-analysis is disabled

This commit is contained in:
Valentin Mihai 2023-12-12 15:07:11 +02:00
parent 14e5c53272
commit 23a0c0940d
2 changed files with 15 additions and 3 deletions

View File

@ -48,7 +48,7 @@
<iqser-circle-button
(action)="acceptRecommendation()"
*ngIf="annotationPermissions.canAcceptRecommendation"
*ngIf="canAcceptRecommendation"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.accept-recommendation.label' | translate"
[type]="buttonType"
@ -102,7 +102,7 @@
<iqser-circle-button
(action)="annotationActionsService.forceAnnotation(annotations)"
*ngIf="annotationPermissions.canForceRedaction"
*ngIf="canForceRedaction"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.force-redaction.label' | translate"
[type]="buttonType"
@ -111,7 +111,7 @@
<iqser-circle-button
(action)="annotationActionsService.forceAnnotation(annotations, true)"
*ngIf="annotationPermissions.canForceHint"
*ngIf="canForceHint"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.force-hint.label' | translate"
[type]="buttonType"

View File

@ -81,6 +81,18 @@ export class AnnotationActionsComponent implements OnChanges {
return this.#annotationChangesAllowed && this.annotationPermissions.canRemoveRedaction && this.#sameType;
}
get canForceRedaction() {
return this.#annotationChangesAllowed && this.annotationPermissions.canForceRedaction;
}
get canForceHint() {
return this.#annotationChangesAllowed && this.annotationPermissions.canForceHint;
}
get canAcceptRecommendation() {
return this.#annotationChangesAllowed && this.annotationPermissions.canAcceptRecommendation;
}
get viewerAnnotations() {
return this._annotationManager.get(this.#annotations);
}