From 481bfdeb79aeb866f5e6cc8edea6847b9f0b8b91 Mon Sep 17 00:00:00 2001 From: sniedzielski <52816247+sniedzielski@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:30:27 +0200 Subject: [PATCH] CM-983: added downloading template file for upload (#90) --- .../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({
+ + <><>