From e0d36178be8a25703b3050cb34619a9d2fad53d5 Mon Sep 17 00:00:00 2001 From: jerem Date: Fri, 8 Nov 2024 14:48:45 +0100 Subject: [PATCH] add search parameters in menu --- client/src/pages/openalex-ror/openalexTab.jsx | 33 ++++++++++++++----- client/src/pages/openalex-ror/results.jsx | 1 + 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/client/src/pages/openalex-ror/openalexTab.jsx b/client/src/pages/openalex-ror/openalexTab.jsx index 00003f2..0c14933 100644 --- a/client/src/pages/openalex-ror/openalexTab.jsx +++ b/client/src/pages/openalex-ror/openalexTab.jsx @@ -1,12 +1,8 @@ import { Button, - Col, - Container, - Modal, - ModalContent, - ModalFooter, - ModalTitle, - Row, + Container, Row, Col, + Modal, ModalContent, ModalFooter, ModalTitle, + TagGroup, Tag, TextInput, } from '@dataesr/dsfr-plus'; import PropTypes from 'prop-types'; @@ -21,6 +17,7 @@ import OpenalexView from './openalexView'; export default function OpenalexTab({ affiliations, + options, setAllOpenalexCorrections, undo, }) { @@ -32,7 +29,6 @@ export default function OpenalexTab({ status.validated.id, status.excluded.id, ]); - const [fixedMenu, setFixedMenu] = useState(false); const [isModalOpen, setIsModalOpen] = useState(false); const [ror, setRor] = useState(); const [selectedOpenAlex, setSelectedOpenAlex] = useState([]); @@ -111,6 +107,27 @@ export default function OpenalexTab({ +
+ Search parameters +
+ + + {`Selected years: ${options.startYear} - ${options.endYear}`} + + + Affiliations: essec + + + + +
{selectedOpenAlex.length} {` selected affiliation${selectedOpenAlex.length === 1 ? '' : 's'}`} diff --git a/client/src/pages/openalex-ror/results.jsx b/client/src/pages/openalex-ror/results.jsx index 40700b5..bb252b9 100644 --- a/client/src/pages/openalex-ror/results.jsx +++ b/client/src/pages/openalex-ror/results.jsx @@ -188,6 +188,7 @@ export default function Affiliations() { affiliations={affiliations.filter( (affiliation) => affiliation.source === 'OpenAlex', )} + options={options} setAllOpenalexCorrections={setAllOpenalexCorrections} undo={undo} />