From 2663dbc005ccc0ca14a24bc4f877c2c0c924d39e Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 3 Dec 2024 14:49:36 +0100 Subject: [PATCH] add group to export small cleanup --- src/components/bouquets/BouquetDatasetList.vue | 2 +- src/model/topic.ts | 2 +- src/services/export.ts | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/bouquets/BouquetDatasetList.vue b/src/components/bouquets/BouquetDatasetList.vue index a3c0acea6..6fda5d274 100644 --- a/src/components/bouquets/BouquetDatasetList.vue +++ b/src/components/bouquets/BouquetDatasetList.vue @@ -61,7 +61,7 @@ const handleRenameGroup = (oldGroupName: string, newGroupName: string) => { const handleDeleteGroup = (groupName: string) => { datasetsProperties.value = deleteGroup(groupName) - // emits('updateDatasets') + emits('updateDatasets') } const loadDatasetsContent = () => { diff --git a/src/model/topic.ts b/src/model/topic.ts index db1072765..ec7cc3e70 100644 --- a/src/model/topic.ts +++ b/src/model/topic.ts @@ -19,7 +19,7 @@ export interface DatasetProperties { uri: string | null id: string | null availability: Availability - group?: string | null + group?: string // those are "local" properties, not stored on data.gouv.fr remoteDeleted?: boolean remoteArchived?: boolean diff --git a/src/services/export.ts b/src/services/export.ts index 7e2155e8a..1c1e4915b 100644 --- a/src/services/export.ts +++ b/src/services/export.ts @@ -12,6 +12,7 @@ interface DatasetRow { description?: string last_update?: string organization?: string + group?: string } export const exportDatasets = async ( @@ -26,7 +27,8 @@ export const exportDatasets = async ( 'title', 'description', 'last_update', - 'organization' + 'organization', + 'group' ] const rows = await Promise.all( datasets.map(async (datasetProperties) => { @@ -34,7 +36,8 @@ export const exportDatasets = async ( label: datasetProperties.title, label_description: datasetProperties.purpose, availability: datasetProperties.availability, - uri: datasetProperties.uri + uri: datasetProperties.uri, + group: datasetProperties.group } const remoteDataset = datasetProperties.id != null