RED-8187: removed buttons for non-dossier members.
This commit is contained in:
parent
5be95976d6
commit
bdbdb4d2b0
@ -50,6 +50,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
readonly currentUser = getCurrentUser<User>();
|
||||
toggleTooltip?: string;
|
||||
assignTooltip?: string;
|
||||
showDownload = false;
|
||||
showSetToNew = false;
|
||||
showUndoApproval = false;
|
||||
showAssignToSelf = false;
|
||||
@ -73,7 +74,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
isDossierOverviewList = false;
|
||||
isDossierOverviewWorkflow = false;
|
||||
isFilePreview = false;
|
||||
canAnalyzeFile = false;
|
||||
isDossierMember = false;
|
||||
tooltipPosition = IqserTooltipPositions.above;
|
||||
buttons: Action[];
|
||||
@ViewChild(ExpandableFileActionsComponent)
|
||||
@ -156,7 +157,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
files: [this.file],
|
||||
dossier: this.dossier,
|
||||
tooltipClass: 'small',
|
||||
show: this._permissionsService.canDownloadRedactedFile() && !!this.file.lastProcessed,
|
||||
show: this.showDownload,
|
||||
disabled: this.file.processingStatus === ProcessingFileStatuses.ERROR,
|
||||
helpModeKey: 'download',
|
||||
},
|
||||
@ -235,7 +236,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltipClass: 'small',
|
||||
icon: 'iqser:refresh',
|
||||
show: this.showReanalyseFilePreview,
|
||||
disabled: this.file.isProcessing || !this.canAnalyzeFile,
|
||||
disabled: this.file.isProcessing,
|
||||
helpModeKey: 'stop_analysis',
|
||||
},
|
||||
{
|
||||
@ -273,7 +274,6 @@ export class FileActionsComponent implements OnChanges {
|
||||
icon: 'iqser:refresh',
|
||||
show: this.showReanalyseDossierOverview,
|
||||
helpModeKey: 'stop_analysis',
|
||||
disabled: !this.canAnalyzeFile,
|
||||
},
|
||||
{
|
||||
id: 'toggle-analysis-btn',
|
||||
@ -283,7 +283,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: this.toggleTooltip,
|
||||
class: { 'mr-24': this.isDossierOverviewList },
|
||||
checked: !this.file.excluded,
|
||||
show: this.showToggleAnalysis,
|
||||
show: this.showToggleAnalysis && this.isDossierMember,
|
||||
helpModeKey: 'disable_extraction',
|
||||
},
|
||||
];
|
||||
@ -445,7 +445,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
this.canToggleAnalysis = this._permissionsService.canToggleAnalysis(this.file, this.dossier);
|
||||
this.showToggleAnalysis = !!this.file.lastProcessed && this._permissionsService.showToggleAnalysis(this.dossier);
|
||||
this.toggleTooltip = this._toggleTooltip;
|
||||
this.canAnalyzeFile = this._permissionsService.isDossierMember(this.dossier);
|
||||
this.isDossierMember = this._permissionsService.isDossierMember(this.dossier);
|
||||
|
||||
this.showDelete = this._permissionsService.canSoftDeleteFile(this.file, this.dossier);
|
||||
this.showOCR = this._permissionsService.canOcrFile(this.file, this.dossier);
|
||||
@ -457,9 +457,10 @@ export class FileActionsComponent implements OnChanges {
|
||||
|
||||
const showReanalyse = this.canReanalyse || this.file.excludedFromAutomaticAnalysis || this.analysisForced;
|
||||
|
||||
this.showReanalyseFilePreview = showReanalyse && this.isFilePreview && !this.file.isApproved;
|
||||
this.showReanalyseDossierOverview = showReanalyse && this.isDossierOverview && !this.file.isApproved;
|
||||
this.showReanalyseFilePreview = showReanalyse && this.isFilePreview && !this.file.isApproved && this.isDossierMember;
|
||||
this.showReanalyseDossierOverview = showReanalyse && this.isDossierOverview && !this.file.isApproved && this.isDossierMember;
|
||||
|
||||
this.showDownload = this._permissionsService.canDownloadRedactedFile() && !!this.file.lastProcessed && this.isDossierMember;
|
||||
this.buttons = this._buttons;
|
||||
|
||||
this._changeRef.markForCheck();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user