Merge branch 'VM/RED-8072' into 'master'

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

Closes RED-8072

See merge request redactmanager/red-ui!224
This commit is contained in:
Dan Percic 2023-12-12 13:57:42 +01:00
commit 19cf5fe9a0
2 changed files with 15 additions and 3 deletions

View File

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

View File

@ -88,6 +88,18 @@ export class AnnotationActionsComponent implements OnChanges {
return this.#annotationChangesAllowed && this.annotationPermissions.canRemoveRedaction && this.#sameType; 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() { get viewerAnnotations() {
return this._annotationManager.get(this.#annotations); return this._annotationManager.get(this.#annotations);
} }