Skip to content

Commit

Permalink
add search parameters in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
jerem1508 committed Nov 8, 2024
1 parent e4f14b3 commit e0d3617
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
33 changes: 25 additions & 8 deletions client/src/pages/openalex-ror/openalexTab.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -21,6 +17,7 @@ import OpenalexView from './openalexView';

export default function OpenalexTab({
affiliations,
options,
setAllOpenalexCorrections,
undo,
}) {
Expand All @@ -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([]);
Expand Down Expand Up @@ -111,6 +107,27 @@ export default function OpenalexTab({
</Modal>
<Row className="wm-bg">
<Col md={2} className="wm-menu">
<div className="wm-text">
Search parameters
</div>
<TagGroup className="fr-ml-1w">
<Tag color="green-emeraude" size="sm">
{`Selected years: ${options.startYear} - ${options.endYear}`}
</Tag>
<Tag color="green-tilleul-verveine" size="sm">
Affiliations: essec
</Tag>
</TagGroup>
<Button
icon="arrow-go-back-fill"
color="blue-ecume"
size="sm"
style={{ width: '100%' }}
>
Back to search
</Button>

<hr />
<div className="wm-text fr-mb-3w">
<span>{selectedOpenAlex.length}</span>
{` selected affiliation${selectedOpenAlex.length === 1 ? '' : 's'}`}
Expand Down
1 change: 1 addition & 0 deletions client/src/pages/openalex-ror/results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export default function Affiliations() {
affiliations={affiliations.filter(
(affiliation) => affiliation.source === 'OpenAlex',
)}
options={options}
setAllOpenalexCorrections={setAllOpenalexCorrections}
undo={undo}
/>
Expand Down

0 comments on commit e0d3617

Please sign in to comment.