Commit 2e8afd41 authored by Oleksii Savran's avatar Oleksii Savran Committed by Matija Obreza

Fixes after rebase

parent 74e833b0
import Article from 'model/cms/Article';
import Crop from 'model/genesys/Crop';
import ImageGallery from 'model/repository/ImageGallery';
import RepositoryFile from 'model/repository/RepositoryFile';
import Dataset from 'model/catalog/Dataset';
import Subset from 'model/subset/Subset';
import DescriptorList from 'model/catalog/DescriptorList';
import DiversityTree from 'model/DiversityTree';
/*
* Defined in Swagger as '#/definitions/CropDetails'
*/
class CropDetails extends Crop {
public accessionCount: number;
public blurb: Article;
public files: RepositoryFile[];
public imageGallery: ImageGallery;
public overview: any;
public recentDatasets: Dataset[];
public recentSubsets: Subset[];
public recentDescriptorLists: DescriptorList[];
public diversityTrees: DiversityTree[];
}
export default CropDetails;
......@@ -5,6 +5,7 @@ import RepositoryFile from '@genesys/client/model/repository/RepositoryFile';
import Dataset from '@genesys/client/model/catalog/Dataset';
import Subset from '@genesys/client/model/subset/Subset';
import DescriptorList from '@genesys/client/model/catalog/DescriptorList';
import DiversityTree from '@genesys/client/model/DiversityTree';
/*
* Defined in Swagger as '#/definitions/CropDetails'
......@@ -18,6 +19,7 @@ class CropDetails extends Crop {
public recentDatasets: Dataset[];
public recentSubsets: Subset[];
public recentDescriptorLists: DescriptorList[];
public diversityTrees: DiversityTree[];
}
......
......@@ -16,6 +16,7 @@ import { showSnackbar } from 'actions/snackbar';
// Models
import Crop from '@genesys/client/model/genesys/Crop';
import CropDetails from '@genesys/client/model/genesys/CropDetails';
import RepositoryFile from '@genesys/client/model/repository/RepositoryFile';
// UI
import PageLayout, { PageContents, MainSection } from 'ui/layout/PageLayout';
......@@ -38,7 +39,6 @@ import { IPageRequest } from '@genesys/client/model/Page';
import ErrorMessage from 'ui/common/error/ErrorMessage';
import ImageGalleryView from 'repository/ui/c/ImageGalleryView';
import TreePreviewer from 'crop/ui/c/TreePreviewer';
import RepositoryFile from 'model/repository/RepositoryFile';
import { ScrollToTopOnMount } from 'ui/common/page/scrollers';
import { DatasetLink, DiversityTreeLink, SubsetLink } from 'ui/genesys/Links';
import { DescriptorListLink } from 'ui/catalog/Links';
......@@ -259,7 +259,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
{ treesData && treesData.map((tree) => (tree && tree.treeData.children && tree.treeData.children.length > 0 &&
<TreePreviewer
key={ tree.treeFile.uuid }
source={ tree.treeFile }
treeFile={ tree.treeFile }
treeData={ tree.treeData }
name={ tree.treeFile.subject || tree.treeFile.title || crop.name }
/>
......
......@@ -7,6 +7,7 @@ import navigateTo from 'actions/navigation';
import { filterCodeToUrl } from 'actions/filterCode';
// import { showSnackbar } from 'actions/snackbar';
import { createApiCaller , createPureApiCaller } from 'actions/ApiCall';
import { apiDeleteDiversityTrees, apiRejectDiversityTrees } from 'divtree/actions/editor';
// Constants
import {
......@@ -15,17 +16,18 @@ import {
CLEAR_DIVERSITY_TREE,
} from 'divtree/constants';
// Service
import AccessionService from '@genesys/client/service/genesys/AccessionService';
import DiversityTreeService from '@genesys/client/service/genesys/DiversityTreeService';
// Model
import FilteredPage from '@genesys/client/model/FilteredPage';
import DiversityTreeService from '@genesys/client/service/genesys/DiversityTreeService';
import Page from '@genesys/client/model/Page';
import {AccessionRef} from '@genesys/client/model/accession/AccessionRef';
import OpResponse from '@genesys/client/model/OpResponse';
import { apiDeleteDiversityTrees, apiRejectDiversityTrees } from 'divtree/actions/editor';
import DiversityTree from '@genesys/client/model/DiversityTree';
import AccessionService from '../../service/genesys/AccessionService';
import Accession from '../../model/accession/Accession';
import Accession from '@genesys/client/model/accession/Accession';
// Wrapped API Calls
const apiListDiversityTreeAccessions = createApiCaller(DiversityTreeService.listAccessions, APPEND_DIVERSITY_TREE_ACCESSIONS);
const apiLoadDiversityTree = createApiCaller(DiversityTreeService.get, RECEIVE_DIVERSITY_TREE);
......
......@@ -20,9 +20,9 @@ import navigateTo from 'actions/navigation';
import { repositoryDownloadUrl } from 'repository/actions/public';
// import { addSubsetAccessionsToMyList } from 'list/actions/public';
// Models
import FilteredPage from 'model/FilteredPage';
import Accession from 'model/accession/Accession';
import RepositoryFile from 'model/repository/RepositoryFile';
import FilteredPage from '@genesys/client/model/FilteredPage';
import Accession from '@genesys/client/model/accession/Accession';
import RepositoryFile from '@genesys/client/model/repository/RepositoryFile';
import Page from '@genesys/client/model/Page';
import DiversityTree from '@genesys/client/model/DiversityTree';
import { PublishState } from '@genesys/client/model/common.model';
......
......@@ -3,9 +3,9 @@ import { withStyles, WithStyles, createStyles } from '@material-ui/core/styles';
import { WithTranslation, withTranslation } from 'react-i18next';
// Model
import Accession from 'model/accession/Accession';
import FilteredPage from 'model/FilteredPage';
import Page from 'model/Page';
import Accession from '@genesys/client/model/accession/Accession';
import FilteredPage from '@genesys/client/model/FilteredPage';
import Page from '@genesys/client/model/Page';
import ConfiguredTree from 'crop/ui/c/ConfiguredTree';
import Button from '@material-ui/core/Button';
......@@ -203,7 +203,7 @@ class TreeExplorer extends React.Component<ITreeExplorerProps, any> {
};
private renderAccession = (s: Accession, index: number) => {
return <div className="mt-5 mb-5"><AccessionCard key={ s.uuid } index={ index } accession={ s } editMode={ true }/></div>;
return <div className="mt-5 mb-5" key={ s.uuid }><AccessionCard index={ index } accession={ s } editMode={ true }/></div>;
};
private handleWrapperClick = (e) => {
......
......@@ -11,7 +11,7 @@ import Validators from '@genesys/client/utilities/Validators';
import { DIVERSITY_TREE_CREATOR_FORM } from 'divtree/constants';
// models
import DiversityTreeCreator, { CreatorRole } from '@genesys/client/model/DiversityTreeCreator';
import DiversityTreeCreator from '@genesys/client/model/DiversityTreeCreator';
import DiversityTree from '@genesys/client/model/DiversityTree';
// ui
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment