From 00d165b06df6217e24908405bae0269091c8b729 Mon Sep 17 00:00:00 2001 From: Lyubov Voloshko Date: Mon, 25 Aug 2025 18:24:22 +0300 Subject: [PATCH 1/3] widgets: show Default widget type value initially; check Default values before submitting updated widget --- .../db-table-widgets/db-table-widgets.component.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/components/dashboard/db-table-view/db-table-widgets/db-table-widgets.component.ts b/frontend/src/app/components/dashboard/db-table-view/db-table-widgets/db-table-widgets.component.ts index e321ce920..951edc19f 100644 --- a/frontend/src/app/components/dashboard/db-table-view/db-table-widgets/db-table-widgets.component.ts +++ b/frontend/src/app/components/dashboard/db-table-view/db-table-widgets/db-table-widgets.component.ts @@ -306,8 +306,8 @@ export class DbTableWidgetsComponent implements OnInit { addNewWidget() { this.widgets.push({ field_name: '', - widget_type: '', - widget_params: '', + widget_type: 'Default', + widget_params: '// No settings required', name: '', description: '' }); @@ -319,8 +319,6 @@ export class DbTableWidgetsComponent implements OnInit { widgetTypeChange(fieldName) { let currentWidget = this.widgets.find(widget => widget.field_name === fieldName); - - if (currentWidget.widget_type === 'Default') currentWidget.widget_type = ''; currentWidget.widget_params = this.defaultParams[currentWidget.widget_type || 'Default']; this.widgetParamsChange({fieldName: currentWidget.field_name, value: currentWidget.widget_params}); @@ -373,12 +371,20 @@ export class DbTableWidgetsComponent implements OnInit { .subscribe(res => { const currentWidgetTypes = res.map((widget: Widget) => widget.field_name); this.fields = difference(this.fields, currentWidgetTypes); + res.forEach((widget: Widget) => { + if (widget.widget_type === '') widget.widget_type = 'Default'; + }) this.widgets = res; }); } updateWidgets(afterDeleteAll?: boolean) { this.submitting = true; + + this.widgets.forEach(widget => { + if (widget.widget_type === 'Default') widget.widget_type = ''; + }); + this._tables.updateTableWidgets(this.connectionID, this.tableName, this.widgets) .subscribe(() => { this.submitting = false; From 42c53217439ccc019e96ef21b17e03ea972d5ff5 Mon Sep 17 00:00:00 2001 From: Lyubov Voloshko Date: Mon, 25 Aug 2025 18:30:46 +0300 Subject: [PATCH 2/3] saved filters: remove naming capitalazing --- .../saved-filters-dialog.component.html | 10 +++++----- .../saved-filters-panel.component.html | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-dialog/saved-filters-dialog.component.html b/frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-dialog/saved-filters-dialog.component.html index f6e373290..843615c44 100644 --- a/frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-dialog/saved-filters-dialog.component.html +++ b/frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-dialog/saved-filters-dialog.component.html @@ -1,13 +1,13 @@

- New Fast Filter for {{ data.displayTableName }} + New fast filter for {{ data.displayTableName }}

- Fast Filter name + Fast filter name @@ -16,9 +16,9 @@

-

Conditions & Main column

+

Conditions & main column

- Select which conditions to add and choose a Main column. Main columns remain editable, while conditions are set. + Select which conditions to add and choose a main column. Main columns remain editable, while conditions are set.

@@ -165,7 +165,7 @@

Conditions & Main column

Cancel diff --git a/frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-panel.component.html b/frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-panel.component.html index 3aa69fa85..7b307f10b 100644 --- a/frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-panel.component.html +++ b/frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-panel.component.html @@ -8,12 +8,12 @@ angularticsAction="Saved filters: first time setup is clicked" (click)="handleOpenSavedFiltersDialog()"> tune - Create Fast Filter + Create fast filter