Skip to content

Commit

Permalink
fix(ui): Rename "Works" into "Publications"
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Oct 20, 2023
1 parent 51de1f0 commit c0b3fd4
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 138 deletions.
2 changes: 1 addition & 1 deletion client/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ VITE_APP_NAME="Works finder"
VITE_BSO_AUTH="Basic QlNPOnZuODRxOVhlZjlVN3BtVQ=="
VITE_BSO_MAX_SIZE=10000
VITE_BSO_PIT_KEEP_ALIVE="5m"
VITE_BSO_PUBLICATIONS_INDEX="bso-publications"
VITE_BSO_SIZE=10000
VITE_BSO_URL="https://cluster.elasticsearch.dataesr.ovh"
VITE_BSO_INDICES="bso3-datacite-20230413,bso-publications"
VITE_DESCRIPTION="Retrieve the scholarly outputs of your institution"
VITE_GIT_REPOSITORY_URL="https://github.com/dataesr/works-finder/"
VITE_HEADER_TAG="dev"
Expand Down
2 changes: 0 additions & 2 deletions client/.env.poc

This file was deleted.

26 changes: 13 additions & 13 deletions client/src/pages/home/actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { export2BsoCsv, export2json, importJson } from '../../utils/file';

export default function Actions({
allAffiliations,
allWorks,
allPublications,
options,
setAllAffiliations,
setAllWorks,
setAllPublications,
}) {
const [, setSearchParams] = useSearchParams();
const [displayFileUpload, setDisplayFileUpload] = useState(false);
Expand All @@ -30,27 +30,27 @@ export default function Actions({
>
Restore session
</Button>
<Tooltip id="restore-session-button" hidden={!allWorks.length}>
<Tooltip id="restore-session-button" hidden={!allPublications.length}>
Restore a previous work from saved file
</Tooltip>
<Button
data-tooltip-id="save-session-button"
disabled={!allWorks.length}
disabled={!allPublications.length}
icon="ri-save-line"
onClick={() => export2json(allAffiliations, allWorks, options)}
onClick={() => export2json(allAffiliations, allPublications, options)}
size="sm"
>
Save session
</Button>
<Tooltip id="save-session-button" hidden={!allWorks.length}>
<Tooltip id="save-session-button" hidden={!allPublications.length}>
Save your ongoing work into a file that could be restored later
</Tooltip>
</Col>
<Col className="text-right">
<Button
disabled={!allWorks.length}
disabled={!allPublications.length}
icon="ri-save-line"
onClick={() => export2BsoCsv(allWorks)}
onClick={() => export2BsoCsv(allPublications)}
size="sm"
>
Export BSO
Expand All @@ -64,7 +64,7 @@ export default function Actions({
accept=".json"
hint="Select JSON file to restore from previous state"
label="JSON file"
onChange={(e) => importJson(e, setAllAffiliations, setSearchParams, setAllWorks)}
onChange={(e) => importJson(e, setAllAffiliations, setSearchParams, setAllPublications)}
/>
</Col>
</Row>
Expand All @@ -80,10 +80,10 @@ Actions.propTypes = {
name: PropTypes.string.isRequired,
nameHtml: PropTypes.string.isRequired,
status: PropTypes.string.isRequired,
works: PropTypes.arrayOf(PropTypes.string).isRequired,
worksNumber: PropTypes.number.isRequired,
publications: PropTypes.arrayOf(PropTypes.string).isRequired,
publicationsNumber: PropTypes.number.isRequired,
})).isRequired,
allWorks: PropTypes.arrayOf(PropTypes.shape({
allPublications: PropTypes.arrayOf(PropTypes.shape({
affiliations: PropTypes.arrayOf(PropTypes.object).isRequired,
allIds: PropTypes.arrayOf(PropTypes.object).isRequired,
datasource: PropTypes.string.isRequired,
Expand All @@ -93,5 +93,5 @@ Actions.propTypes = {
})).isRequired,
options: PropTypes.object.isRequired,
setAllAffiliations: PropTypes.func.isRequired,
setAllWorks: PropTypes.func.isRequired,
setAllPublications: PropTypes.func.isRequired,
};
2 changes: 1 addition & 1 deletion client/src/pages/home/filters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default function Filters({ sendQuery }) {
onClick={checkAndSendQuery}
size="sm"
>
Search works
Search publications
</Button>
</Col>
</Row>
Expand Down
Loading

0 comments on commit c0b3fd4

Please sign in to comment.