Accession overviews
Add a new route /a/overview/ that adds a AccessionOverviewPage
:
// Accessions
{
path: '/a/:filterCode(v.+)?',
component: AccessionBrowsePage,
exact: true,
},
{
path: '/a/overview/:filterCode(v.+)?',
component: AccessionOverviewPage,
exact: true,
},
Implement page/accessions/BrowsePage
and display the results from /api/v1/acn/overview?f={filter} using existing <Properties>
and <PropertiesItem>
components.
Add accessions action to fetch data from /api/v1/acn/overview and store it in accessions reducer overview
based on filter code from accessions.paged.filterCode
.
Apply filters from this page should refresh the list of accession data and fetch the overview data:
export const applyOverviewFilters = (filters: string | AccessionFilter, page: IPageRequest = { page: 0 }) => (dispatch) => {
console.log('Applying new filter', filters);
return dispatch(listAccessions(filters, page))
.then((paged) => {
dispatch(receiveAccessions(paged));
dispatch(overviewAccessions(paged.filterCode));
dispatch(updateRoute('/a/overview', paged));
}).catch((error) => {
console.log(`API error`, error);
dispatch(receiveAccessions(null, error.response));
});
};
Current Overview page https://sandbox.genesys-pgr.org/explore/overview?filter=%7B%22institute.code%22%3A%5B%22NGA039%22%5D%7D -- don't over-complicate the new layout.