fixed actions

This commit is contained in:
Timo Bejan 2021-08-13 16:41:56 +03:00
parent 929ea3d35d
commit 4ca5714189
2 changed files with 16 additions and 2 deletions

View File

@ -131,7 +131,21 @@ export class AnnotationActionsService {
permissions: AnnotationPermissions.forUser(this._permissionsService.isApprover(), this._userService.currentUser, annotation)
}));
const canRecategorizeImage = annotations.length === 1 && annotationPermissions[0].permissions.canRecategorizeImage;
const canChangeLegalBasis = annotationPermissions.reduce((acc, next) => acc && next.permissions.canChangeLegalBasis, true);
if (canChangeLegalBasis) {
availableActions.push({
type: 'actionButton',
img: this._convertPath('/assets/icons/general/edit.svg'),
title: this._translateService.instant('annotation-actions.edit-reason.label'),
onClick: () => {
this._ngZone.run(() => {
this.changeLegalBasis(null, annotations, annotationsChanged);
});
}
});
}
const canRecategorizeImage = annotationPermissions.reduce((acc, next) => acc && next.permissions.canRecategorizeImage, true);
if (canRecategorizeImage) {
availableActions.push({
type: 'actionButton',

@ -1 +1 @@
Subproject commit 360ef9bd6c87ec2ebb22554253e9ce9390775f09
Subproject commit 1d46b21c74c07d6811a99b9de6c940c740bc8ceb