Skip to content

Commit

Permalink
certainty level
Browse files Browse the repository at this point in the history
  • Loading branch information
ericjeangirard committed Mar 12, 2024
1 parent 8d16856 commit 553ad75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/pages/datasetsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function DatasetsView({
selection={selectedWorks}
selectionPageOnly
sortField="levelCertainty"
sortOrder={-1}
sortOrder={1}
size="small"
stripedRows
style={{ fontSize: '11px', lineHeight: '10px' }}
Expand Down
4 changes: 2 additions & 2 deletions server/src/utils/works.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ const formatResultFosm = (result, options) => {
ans.nbAuthorsName = ans.fr_authors_name.length;
ans.nbPublicationsLinked = ans.fr_publications_linked.length;
let levelCertainty = '2.medium';
if (ans.nbPublicationsLinked > 0 || ans.nbOrcid > 1 || ans.nbAuthorsName > 1) {
if (ans.nbPublicationsLinked > 0 || ans.nbOrcid >= 2 || ans.nbAuthorsName >= 3) {
levelCertainty = '1.high';
} else if (ans.nbAuthorsName === 1) {
} else if (ans.nbAuthorsName <= 1 && ans.nbOrcid <= 1) {
levelCertainty = '3.low';
}
ans.levelCertainty = levelCertainty;
Expand Down

0 comments on commit 553ad75

Please sign in to comment.