diff --git a/lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts b/lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts index 5bf5f9e53d6..1de798ac203 100644 --- a/lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts +++ b/lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts @@ -25,7 +25,7 @@ export interface NewVersionUploaderDialogData { currentVersion?: Version; showVersionsOnly?: boolean; showComments?: boolean; - allowDownload?: true; + allowDownload?: boolean; } export type NewVersionUploaderData = VersionManagerUploadData | ViewVersion | RefreshData; diff --git a/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts b/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts index 4514dd3b085..79c3c69543f 100644 --- a/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts +++ b/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts @@ -45,18 +45,14 @@ export class NewVersionUploaderService { * @param data data to pass to MatDialog * @param config allow to override default MatDialogConfig * @param selectorAutoFocusedOnClose element's selector which should be autofocused after closing modal - * @param showComments enable comments - * @param allowDownload enable version download * @returns an Observable represents the triggered dialog action or an error in case of an error condition */ openUploadNewVersionDialog( data: NewVersionUploaderDialogData, config?: MatDialogConfig, - selectorAutoFocusedOnClose?: string, - showComments = true, - allowDownload = true + selectorAutoFocusedOnClose?: string ): Observable { - const { file, node, showVersionsOnly } = data; + const { file, node, showVersionsOnly, showComments, allowDownload } = data; return new Observable((observer) => { this.versionsApi.listVersionHistory(node.id).then((versionPaging) => { diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table-cloud.component.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table-cloud.component.ts index 432ccc4fc13..0f830c629f9 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table-cloud.component.ts @@ -49,16 +49,16 @@ export class FilePropertiesTableCloudComponent { mimeTypeIcon; @Output() - rowClick: EventEmitter = new EventEmitter(); + rowClick = new EventEmitter(); @Output() - attachFileClick: EventEmitter = new EventEmitter(); + attachFileClick = new EventEmitter(); @Output() - downloadFile: EventEmitter = new EventEmitter(); + downloadFile = new EventEmitter(); @Output() - uploadNewFileVersion: EventEmitter = new EventEmitter(); + uploadNewFileVersion = new EventEmitter(); @Output() contentModelFileHandler: EventEmitter = new EventEmitter(); @@ -80,10 +80,12 @@ export class FilePropertiesTableCloudComponent { this.downloadFile.emit(file); } - onUploadNewFileVersion(customEvent: any, node: Node){ + onUploadNewFileVersion(customEvent: any, node: Node) { const newVersionUploaderDialogData: NewVersionUploaderDialogData = { file: customEvent.detail.files[0].file, - node + node, + showComments: true, + allowDownload: true }; this.uploadNewFileVersion.emit(newVersionUploaderDialogData); } @@ -102,12 +104,12 @@ export class FilePropertiesTableCloudComponent { getColumnValue(file, displayableCMProperty): string { if (!file.properties[displayableCMProperty.prefixedName]) { - const fieldProperty = this.field.params.displayableCMProperties?.find(property => property.name === displayableCMProperty.name); - return fieldProperty.defaultValue ? this.checkDateTypeAndTransform(displayableCMProperty.dataType, fieldProperty.defaultValue) : '--' ; + const fieldProperty = this.field.params.displayableCMProperties?.find((property) => property.name === displayableCMProperty.name); + return fieldProperty.defaultValue ? this.checkDateTypeAndTransform(displayableCMProperty.dataType, fieldProperty.defaultValue) : '--'; } - return file.properties[displayableCMProperty.prefixedName] ? - this.checkDateTypeAndTransform(displayableCMProperty.dataType, file.properties[displayableCMProperty.prefixedName]) : - '--' ; + return file.properties[displayableCMProperty.prefixedName] + ? this.checkDateTypeAndTransform(displayableCMProperty.dataType, file.properties[displayableCMProperty.prefixedName]) + : '--'; } checkDateTypeAndTransform(dataType, value): string {