forked from openedx/frontend-app-authoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add download taxonomy template button
- Loading branch information
Showing
5 changed files
with
77 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
// @ts-check | ||
import { getTaxonomyExportFile } from './api'; | ||
import { getTaxonomyExportFile, getTaxonomyTemplateFile } from './api'; | ||
|
||
/** | ||
* Downloads the file of the exported taxonomy | ||
* @param {number} pk | ||
* @param {string} format | ||
* @returns {void} | ||
*/ | ||
const exportTaxonomy = (pk, format) => ( | ||
export const exportTaxonomy = (pk, format) => ( | ||
getTaxonomyExportFile(pk, format) | ||
); | ||
|
||
export default exportTaxonomy; | ||
/** | ||
* Downloads the template file for import taxonomies | ||
* @param {('json'|'csv')} format | ||
* @returns {void} | ||
*/ | ||
export const downloadTaxonomyTemplate = (format) => ( | ||
getTaxonomyTemplateFile(format) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters