Skip to content

Commit

Permalink
add group to export
Browse files Browse the repository at this point in the history
small cleanup
  • Loading branch information
narduin committed Dec 3, 2024
1 parent e5a56b9 commit 2663dbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/bouquets/BouquetDatasetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const handleRenameGroup = (oldGroupName: string, newGroupName: string) => {
const handleDeleteGroup = (groupName: string) => {
datasetsProperties.value = deleteGroup(groupName)
// emits('updateDatasets')
emits('updateDatasets')
}
const loadDatasetsContent = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/model/topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions src/services/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface DatasetRow {
description?: string
last_update?: string
organization?: string
group?: string
}

export const exportDatasets = async (
Expand All @@ -26,15 +27,17 @@ export const exportDatasets = async (
'title',
'description',
'last_update',
'organization'
'organization',
'group'
]
const rows = await Promise.all(
datasets.map(async (datasetProperties) => {
const row: DatasetRow = {
label: datasetProperties.title,
label_description: datasetProperties.purpose,
availability: datasetProperties.availability,
uri: datasetProperties.uri
uri: datasetProperties.uri,
group: datasetProperties.group
}
const remoteDataset =
datasetProperties.id != null
Expand Down

0 comments on commit 2663dbc

Please sign in to comment.