[MNT-22418] - disabling action for physical records (#7057)

This commit is contained in:
Vito
2021-05-25 09:15:57 +01:00
committed by GitHub
parent 4c1e462364
commit 65cbd570fb
5 changed files with 44 additions and 8 deletions

View File

@@ -76,13 +76,13 @@
</button>
<mat-menu #fileActionMenu="matMenu" xPosition="before">
<button id="{{'file-'+file.id+'-show-file'}}"
[disabled]="file.isExternal || !file.contentAvailable"
[disabled]="file.isExternal || !file.contentAvailable || !file.mimeType"
mat-menu-item (click)="onAttachFileClicked(file)">
<mat-icon>visibility</mat-icon>
<span>{{ 'FORM.FIELD.VIEW_FILE' | translate }}</span>
</button>
<button id="{{'file-'+file.id+'-download-file'}}"
[disabled]="file.isExternal"
[disabled]="file.isExternal || !file.mimeType"
mat-menu-item (click)="downloadContent(file)">
<mat-icon>file_download</mat-icon>
<span>{{ 'FORM.FIELD.DOWNLOAD_FILE' | translate }}</span>

View File

@@ -256,7 +256,7 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements
from(fileNodeList).pipe(
mergeMap((node) =>
zip(
of(node.content.mimeType),
of(node?.content?.mimeType),
this.activitiContentService.applyAlfrescoNode(node, siteId, accountId),
of(node.isExternal)
)