diff --git a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts index 3fe6a9d90..de8bee50e 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts @@ -113,7 +113,7 @@ export class FileActionsComponent implements OnChanges { } private get _toggleTooltip(): string { - if (!this.currentUser.isManager) { + if (!this.canToggleAnalysis) { return _('file-preview.toggle-analysis.only-managers'); } @@ -405,7 +405,6 @@ export class FileActionsComponent implements OnChanges { this.assignTooltip = this.file.isUnderApproval ? _('dossier-overview.assign-approver') : _('dossier-overview.assign-reviewer'); this.buttonType = this.isFilePreview ? CircleButtonTypes.default : CircleButtonTypes.dark; - this.toggleTooltip = this._toggleTooltip; this.showSetToNew = this._permissionsService.canSetToNew(this.file, this.dossier) && !this.isDossierOverviewWorkflow; this.showUndoApproval = this._permissionsService.canUndoApproval(this.file, this.dossier) && !this.isDossierOverviewWorkflow; @@ -415,6 +414,8 @@ export class FileActionsComponent implements OnChanges { this.canToggleAnalysis = this._permissionsService.canToggleAnalysis(this.file, this.dossier); this.showToggleAnalysis = this._permissionsService.showToggleAnalysis(this.dossier); + this.toggleTooltip = this._toggleTooltip; + this.showDelete = this._permissionsService.canSoftDeleteFile(this.file, this.dossier); this.showOCR = this._permissionsService.canOcrFile(this.file, this.dossier); this.canReanalyse = this._permissionsService.canReanalyseFile(this.file, this.dossier);