From dcb7e4067c334a42cce94e1b86e0e0ab52f90483 Mon Sep 17 00:00:00 2001 From: Tomasz Nastaly Date: Thu, 6 Feb 2025 16:18:22 +0100 Subject: [PATCH] AAE-25571 Add column title to widget (#10620) * AAE-30141 Fix broken amount field * AAE-30141 add title column --- lib/core/src/lib/i18n/en.json | 1 + .../attach-file/attach-file-cloud-widget.component.ts | 2 +- .../file-properties-table-cloud.component.html | 5 +++++ .../file-properties-table-cloud.component.spec.ts | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/core/src/lib/i18n/en.json b/lib/core/src/lib/i18n/en.json index d7746c7351..50de5fb68f 100644 --- a/lib/core/src/lib/i18n/en.json +++ b/lib/core/src/lib/i18n/en.json @@ -53,6 +53,7 @@ "DATA_TABLE_LOAD_FAILED": "There was a problem loading table elements. Please contact administrator.", "EXTERNAL_PROPERTY_LOAD_FAILED": "There was a problem loading external property. Please contact administrator.", "FILE_NAME": "File Name", + "TITLE": "Title", "NO_FILE_ATTACHED": "No file attached", "VALIDATOR": { "INVALID_NUMBER": "Use a different number format", diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts index 31c79862b7..c371f17be2 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts @@ -90,7 +90,7 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent i this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance()); return this._nodesApi; } - displayedColumns = ['icon', 'fileName', 'action']; + displayedColumns = ['icon', 'fileName', 'title', 'action']; constructor(formService: FormService) { super(formService); diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table/file-properties-table-cloud.component.html b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table/file-properties-table-cloud.component.html index d308ee176c..2e0a940d2c 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table/file-properties-table-cloud.component.html +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table/file-properties-table-cloud.component.html @@ -29,6 +29,11 @@ + + {{ 'FORM.FIELD.TITLE' | translate }} + {{ element.title }} + + {{prop.title ? prop.title : prop.name | titlecase }} diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table/file-properties-table-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table/file-properties-table-cloud.component.spec.ts index 683802493d..77b494b4c5 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table/file-properties-table-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/file-properties-table/file-properties-table-cloud.component.spec.ts @@ -62,7 +62,7 @@ describe('FilePropertiesTableCloudComponent', () => { widget.hasFile = true; - widget.displayedColumns = ['icon', 'fileName']; + widget.displayedColumns = ['icon', 'fileName', 'title']; fixture.detectChanges(); });