Skip to content

Commit

Permalink
fix: export function for preparing payload for copy DHIS2-15722
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Sep 8, 2023
1 parent 6d1bcc9 commit 37a3905
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/FileMenu/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ export const appPathFor = (fileType, id) => {
return `${window.location.search}${window.location.hash}`
}
}

export const preparePayloadForSaveAs = ({ ...visualization }) => {
delete visualization.id
delete visualization.created
delete visualization.createdBy

return visualization
}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export { default as DimensionMenu } from './components/DimensionMenu.js'
export { default as PivotTable } from './components/PivotTable/PivotTable.js'

export { default as FileMenu } from './components/FileMenu/FileMenu.js'
export { preparePayloadForSaveAs } from './components/FileMenu/utils.js'

export { default as VisTypeIcon } from './components/VisTypeIcon.js'

Expand Down

0 comments on commit 37a3905

Please sign in to comment.