Commit 2e2e4294 authored by Oleksii Savran's avatar Oleksii Savran

Fixes after rebase

parent dd700047
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'; ...@@ -5,6 +5,7 @@ import RepositoryFile from '@genesys/client/model/repository/RepositoryFile';
import Dataset from '@genesys/client/model/catalog/Dataset'; import Dataset from '@genesys/client/model/catalog/Dataset';
import Subset from '@genesys/client/model/subset/Subset'; import Subset from '@genesys/client/model/subset/Subset';
import DescriptorList from '@genesys/client/model/catalog/DescriptorList'; import DescriptorList from '@genesys/client/model/catalog/DescriptorList';
import DiversityTree from '@genesys/client/model/DiversityTree';
/* /*
* Defined in Swagger as '#/definitions/CropDetails' * Defined in Swagger as '#/definitions/CropDetails'
...@@ -18,6 +19,7 @@ class CropDetails extends Crop { ...@@ -18,6 +19,7 @@ class CropDetails extends Crop {
public recentDatasets: Dataset[]; public recentDatasets: Dataset[];
public recentSubsets: Subset[]; public recentSubsets: Subset[];
public recentDescriptorLists: DescriptorList[]; public recentDescriptorLists: DescriptorList[];
public diversityTrees: DiversityTree[];
} }
......
...@@ -16,6 +16,7 @@ import { showSnackbar } from 'actions/snackbar'; ...@@ -16,6 +16,7 @@ import { showSnackbar } from 'actions/snackbar';
// Models // Models
import Crop from '@genesys/client/model/genesys/Crop'; import Crop from '@genesys/client/model/genesys/Crop';
import CropDetails from '@genesys/client/model/genesys/CropDetails'; import CropDetails from '@genesys/client/model/genesys/CropDetails';
import RepositoryFile from '@genesys/client/model/repository/RepositoryFile';
// UI // UI
import PageLayout, { PageContents, MainSection } from 'ui/layout/PageLayout'; import PageLayout, { PageContents, MainSection } from 'ui/layout/PageLayout';
...@@ -38,7 +39,6 @@ import { IPageRequest } from '@genesys/client/model/Page'; ...@@ -38,7 +39,6 @@ import { IPageRequest } from '@genesys/client/model/Page';
import ErrorMessage from 'ui/common/error/ErrorMessage'; import ErrorMessage from 'ui/common/error/ErrorMessage';
import ImageGalleryView from 'repository/ui/c/ImageGalleryView'; import ImageGalleryView from 'repository/ui/c/ImageGalleryView';
import TreePreviewer from 'crop/ui/c/TreePreviewer'; import TreePreviewer from 'crop/ui/c/TreePreviewer';
import RepositoryFile from 'model/repository/RepositoryFile';
import { ScrollToTopOnMount } from 'ui/common/page/scrollers'; import { ScrollToTopOnMount } from 'ui/common/page/scrollers';
import { DatasetLink, DiversityTreeLink, SubsetLink } from 'ui/genesys/Links'; import { DatasetLink, DiversityTreeLink, SubsetLink } from 'ui/genesys/Links';
import { DescriptorListLink } from 'ui/catalog/Links'; import { DescriptorListLink } from 'ui/catalog/Links';
...@@ -259,7 +259,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> { ...@@ -259,7 +259,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
{ treesData && treesData.map((tree) => (tree && tree.treeData.children && tree.treeData.children.length > 0 && { treesData && treesData.map((tree) => (tree && tree.treeData.children && tree.treeData.children.length > 0 &&
<TreePreviewer <TreePreviewer
key={ tree.treeFile.uuid } key={ tree.treeFile.uuid }
source={ tree.treeFile } treeFile={ tree.treeFile }
treeData={ tree.treeData } treeData={ tree.treeData }
name={ tree.treeFile.subject || tree.treeFile.title || crop.name } name={ tree.treeFile.subject || tree.treeFile.title || crop.name }
/> />
......
...@@ -7,6 +7,7 @@ import navigateTo from 'actions/navigation'; ...@@ -7,6 +7,7 @@ import navigateTo from 'actions/navigation';
import { filterCodeToUrl } from 'actions/filterCode'; import { filterCodeToUrl } from 'actions/filterCode';
// import { showSnackbar } from 'actions/snackbar'; // import { showSnackbar } from 'actions/snackbar';
import { createApiCaller , createPureApiCaller } from 'actions/ApiCall'; import { createApiCaller , createPureApiCaller } from 'actions/ApiCall';
import { apiDeleteDiversityTrees, apiRejectDiversityTrees } from 'divtree/actions/editor';
// Constants // Constants
import { import {
...@@ -15,17 +16,18 @@ import { ...@@ -15,17 +16,18 @@ import {
CLEAR_DIVERSITY_TREE, CLEAR_DIVERSITY_TREE,
} from 'divtree/constants'; } from 'divtree/constants';
// Service
import AccessionService from '@genesys/client/service/genesys/AccessionService';
import DiversityTreeService from '@genesys/client/service/genesys/DiversityTreeService';
// Model // Model
import FilteredPage from '@genesys/client/model/FilteredPage'; import FilteredPage from '@genesys/client/model/FilteredPage';
import DiversityTreeService from '@genesys/client/service/genesys/DiversityTreeService';
import Page from '@genesys/client/model/Page'; import Page from '@genesys/client/model/Page';
import {AccessionRef} from '@genesys/client/model/accession/AccessionRef'; import {AccessionRef} from '@genesys/client/model/accession/AccessionRef';
import OpResponse from '@genesys/client/model/OpResponse'; import OpResponse from '@genesys/client/model/OpResponse';
import { apiDeleteDiversityTrees, apiRejectDiversityTrees } from 'divtree/actions/editor';
import DiversityTree from '@genesys/client/model/DiversityTree'; import DiversityTree from '@genesys/client/model/DiversityTree';
import AccessionService from '../../service/genesys/AccessionService'; import Accession from '@genesys/client/model/accession/Accession';
import Accession from '../../model/accession/Accession';
// Wrapped API Calls // Wrapped API Calls
const apiListDiversityTreeAccessions = createApiCaller(DiversityTreeService.listAccessions, APPEND_DIVERSITY_TREE_ACCESSIONS); const apiListDiversityTreeAccessions = createApiCaller(DiversityTreeService.listAccessions, APPEND_DIVERSITY_TREE_ACCESSIONS);
const apiLoadDiversityTree = createApiCaller(DiversityTreeService.get, RECEIVE_DIVERSITY_TREE); const apiLoadDiversityTree = createApiCaller(DiversityTreeService.get, RECEIVE_DIVERSITY_TREE);
......
...@@ -20,9 +20,9 @@ import navigateTo from 'actions/navigation'; ...@@ -20,9 +20,9 @@ import navigateTo from 'actions/navigation';
import { repositoryDownloadUrl } from 'repository/actions/public'; import { repositoryDownloadUrl } from 'repository/actions/public';
// import { addSubsetAccessionsToMyList } from 'list/actions/public'; // import { addSubsetAccessionsToMyList } from 'list/actions/public';
// Models // Models
import FilteredPage from 'model/FilteredPage'; import FilteredPage from '@genesys/client/model/FilteredPage';
import Accession from 'model/accession/Accession'; import Accession from '@genesys/client/model/accession/Accession';
import RepositoryFile from 'model/repository/RepositoryFile'; import RepositoryFile from '@genesys/client/model/repository/RepositoryFile';
import Page from '@genesys/client/model/Page'; import Page from '@genesys/client/model/Page';
import DiversityTree from '@genesys/client/model/DiversityTree'; import DiversityTree from '@genesys/client/model/DiversityTree';
import { PublishState } from '@genesys/client/model/common.model'; import { PublishState } from '@genesys/client/model/common.model';
......
...@@ -3,9 +3,9 @@ import { withStyles, WithStyles, createStyles } from '@material-ui/core/styles'; ...@@ -3,9 +3,9 @@ import { withStyles, WithStyles, createStyles } from '@material-ui/core/styles';
import { WithTranslation, withTranslation } from 'react-i18next'; import { WithTranslation, withTranslation } from 'react-i18next';
// Model // Model
import Accession from 'model/accession/Accession'; import Accession from '@genesys/client/model/accession/Accession';
import FilteredPage from 'model/FilteredPage'; import FilteredPage from '@genesys/client/model/FilteredPage';
import Page from 'model/Page'; import Page from '@genesys/client/model/Page';
import ConfiguredTree from 'crop/ui/c/ConfiguredTree'; import ConfiguredTree from 'crop/ui/c/ConfiguredTree';
import Button from '@material-ui/core/Button'; import Button from '@material-ui/core/Button';
...@@ -203,7 +203,7 @@ class TreeExplorer extends React.Component<ITreeExplorerProps, any> { ...@@ -203,7 +203,7 @@ class TreeExplorer extends React.Component<ITreeExplorerProps, any> {
}; };
private renderAccession = (s: Accession, index: number) => { 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) => { private handleWrapperClick = (e) => {
......
...@@ -11,7 +11,7 @@ import Validators from '@genesys/client/utilities/Validators'; ...@@ -11,7 +11,7 @@ import Validators from '@genesys/client/utilities/Validators';
import { DIVERSITY_TREE_CREATOR_FORM } from 'divtree/constants'; import { DIVERSITY_TREE_CREATOR_FORM } from 'divtree/constants';
// models // models
import DiversityTreeCreator, { CreatorRole } from '@genesys/client/model/DiversityTreeCreator'; import DiversityTreeCreator from '@genesys/client/model/DiversityTreeCreator';
import DiversityTree from '@genesys/client/model/DiversityTree'; import DiversityTree from '@genesys/client/model/DiversityTree';
// ui // 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