Skip to content

Commit

Permalink
feat(ui): Add year and journal in WorksView, close #28
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Oct 23, 2023
1 parent 16f5323 commit 779c830
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions client/src/pages/home/views/works.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export default function WorksView({
<Column field="allIdsHtml" header="Ids" body={allIdsTemplate} filter filterMatchMode="contains" filterPlaceholder="Search by id" />
<Column field="datasource" header="Source" />
<Column field="type" header="Type" />
<Column field="year" header="Year" />
<Column field="journal_name" header="Journal" />
<Column field="affiliationsHtml" header="Affiliations" body={affiliationsTemplate} filter filterField="affiliationsSearch" filterMatchMode="contains" filterPlaceholder="Search by affiliation" style={{ minWidth: '300px' }} />
<Column field="authorsHtml" header="Authors" body={authorsTemplate} filter filterMatchMode="contains" filterPlaceholder="Search by author" style={{ minWidth: '10px' }} />
<Column field="title" header="Title" filter filterMatchMode="contains" showFilterMenu={false} filterPlaceholder="Search by title" style={{ minWidth: '10px' }} />
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/works.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const getBsoQuery = (options, pit, searchAfter) => {
query.query.bool.filter.push({ range: { year: { lte: options.endYear } } });
}
query.query.bool.minimum_should_match = 1;
query._source = ['affiliations', 'authors', 'doi', 'external_ids', 'genre', 'hal_id', 'id', 'title', 'year'];
query._source = ['affiliations', 'authors', 'doi', 'external_ids', 'genre', 'hal_id', 'id', 'journal_name', 'title', 'year'];
query.sort = ['_shard_doc'];
if (pit) {
query.pit = { id: pit, keep_alive: VITE_BSO_PIT_KEEP_ALIVE };
Expand Down

0 comments on commit 779c830

Please sign in to comment.