From 0e81e05526dc79ad3f91fa3cb777eb3099c380c0 Mon Sep 17 00:00:00 2001 From: sniedzielski Date: Thu, 1 Aug 2024 11:07:25 +0200 Subject: [PATCH] CM-983: added downloading template file for upload --- .../dialogs/IndividualsUploadDialog.js | 14 ++++++++++++ src/translations/en.json | 1 + src/util/export.js | 22 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 src/util/export.js diff --git a/src/components/dialogs/IndividualsUploadDialog.js b/src/components/dialogs/IndividualsUploadDialog.js index 2a675ad..4805647 100644 --- a/src/components/dialogs/IndividualsUploadDialog.js +++ b/src/components/dialogs/IndividualsUploadDialog.js @@ -23,6 +23,7 @@ import WorkflowsPicker from '../../pickers/WorkflowsPicker'; import { fetchWorkflows } from '../../actions'; import IndividualsHistoryUploadDialog from './IndividualsHistoryUploadDialog'; import { EMPTY_STRING, INDIVIDUAL_MODULE_NAME, PYTHON_DEFAULT_IMPORT_WORKFLOW } from '../../constants'; +import downloadTemplate from '../../util/export'; const styles = (theme) => ({ item: theme.paper.item, @@ -143,6 +144,10 @@ function IndividualsUploadDialog({ return `${modulesManager.getRef('individual.route.enrollment')}`; } + const downloadExampleTemplate = () => { + downloadTemplate(); + }; + return ( <> @@ -261,6 +266,15 @@ function IndividualsUploadDialog({
+ + <><>