diff --git a/frontend/src/app/components/dashboard/db-table-view/db-table-view.component.ts b/frontend/src/app/components/dashboard/db-table-view/db-table-view.component.ts index 4a817a55d..c5279a681 100644 --- a/frontend/src/app/components/dashboard/db-table-view/db-table-view.component.ts +++ b/frontend/src/app/components/dashboard/db-table-view/db-table-view.component.ts @@ -557,12 +557,32 @@ export class DbTableViewComponent implements OnInit { return stringValue; }; + // Check if there's any selection + if (!this.selection.selected || this.selection.selected.length === 0) { + this._notifications.showErrorSnackbar('No rows selected for export'); + return; + } + const header = Object.keys(this.selection.selected[0]); - // Create CSV rows with proper handling of nested objects + // Create CSV rows with proper handling of foreign keys const csv = this.selection.selected.map((row) => header - .map((fieldName) => convertToCSVValue(row[fieldName])) + .map((fieldName) => { + let value = row[fieldName]; + + // Check if this field is a foreign key + if (this.isForeignKey(fieldName) && value && typeof value === 'object') { + // Get the foreign key definition + const foreignKey = this.tableData.foreignKeys[fieldName]; + if (foreignKey) { + // Extract only the primary key value from the foreign key object + value = value[foreignKey.referenced_column_name]; + } + } + + return convertToCSVValue(value); + }) .join(',') ); diff --git a/frontend/src/app/components/sso/sso.component.css b/frontend/src/app/components/sso/sso.component.css index 2f28fe0bf..57f73ee0b 100644 --- a/frontend/src/app/components/sso/sso.component.css +++ b/frontend/src/app/components/sso/sso.component.css @@ -7,6 +7,11 @@ width: 100%; } +.samlConfigForm__checkbox { + margin-top: -4px; + margin-bottom: 20px; +} + .ssoPageHeader { margin-bottom: 24px !important; } diff --git a/frontend/src/app/components/sso/sso.component.html b/frontend/src/app/components/sso/sso.component.html index 24d9834bd..4b3479313 100644 --- a/frontend/src/app/components/sso/sso.component.html +++ b/frontend/src/app/components/sso/sso.component.html @@ -71,6 +71,7 @@