diff --git a/app/workspace/projects/crud/ProjectExportView.jsx b/app/workspace/projects/crud/ProjectExportView.jsx index b031f6d..bf59f5b 100644 --- a/app/workspace/projects/crud/ProjectExportView.jsx +++ b/app/workspace/projects/crud/ProjectExportView.jsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from "react"; +import React, { useRef, useState, useEffect } from "react"; import { Link, useParams, useNavigate, useLocation } from "react-router-dom"; import PropTypes from "prop-types"; import IDUtil from "../../../util/IDUtil"; @@ -22,6 +22,13 @@ const ProjectExportView = ({ recipe, params, user, clientId }) => { const [exportType, setExportType] = useState('projectMetadata') const [project, setProject] = useState(null); + const nameExportRef = useRef(null); + const namePersonRef = useRef(null); + const emailRef = useRef(null); + const affiliationRef = useRef(null); + const collaborativeOrganisationRef = useRef(null); + const descRef = useRef(null); + // React hooks useEffect(() => { setBreadCrumbsFromMatch(location.pathname); @@ -46,7 +53,7 @@ const ProjectExportView = ({ recipe, params, user, clientId }) => { }); }; - const handleSubmit = (e, proj) => { + const handleProjectMetadataSubmit = (e, proj) => { e.preventDefault(); exportDataAsJSON(proj) @@ -54,6 +61,13 @@ const ProjectExportView = ({ recipe, params, user, clientId }) => { return false; }; + const handleCorpusSubmit = (e, proj) => { + e.preventDefault(); + alert("Need to implement sending \"" + nameExportRef.current?.value + "\" to the Set API and email data provider") + + return false; + }; + let cancelButton = null; if (cancelLink && cancelLink !== "") { cancelButton = ( @@ -75,6 +89,8 @@ const ProjectExportView = ({ recipe, params, user, clientId }) => { } else if (project) { contents = (
On this page you can export the metadata describing "{project.name}" or request to send your corpus, consisting of the metadata of the items in your bookmark groups and queries, to the SANE environment for analysis