Skip to content

Commit 003ba69

Browse files
authored
Merge pull request #127 from EBISPOT/develop
Publication import and Submission linking
2 parents 99c70dc + b5c91d7 commit 003ba69

38 files changed

+771
-86
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface CurationStatus {
2+
curationStatusId: string;
3+
status: string;
4+
}

src/app/core/models/curator.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface Curator {
2+
curatorId: string;
3+
firstName: string;
4+
lastName: string;
5+
email: string;
6+
// this is added in the front-end
7+
fullName: string;
8+
}

src/app/core/models/publication.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { Curator } from './curator';
2+
import { CurationStatus } from './curationStatus';
3+
14
export interface Publication {
25
publicationId: string;
36
pmid: string;
@@ -10,4 +13,6 @@ export interface Publication {
1013
email: string;
1114
};
1215
status: string;
16+
curationStatus: CurationStatus;
17+
curator: Curator;
1318
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ApiResponse } from './apiResponse';
2+
import { CurationStatus } from '../../curationStatus';
3+
4+
export interface CurationStatusListApiResponse extends ApiResponse {
5+
_embedded: {
6+
curationStatusDToes: CurationStatus[];
7+
};
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ApiResponse } from './apiResponse';
2+
import { Curator } from '../../curator';
3+
4+
export interface CuratorListApiResponse extends ApiResponse {
5+
_embedded: {
6+
curatorDToes: Curator[];
7+
};
8+
}

src/app/core/models/rest/api-responses/efoTraitsListApiResponse.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { EfoTrait } from '../../efoTrait';
22
import { ApiResponse } from './apiResponse';
33

44
export interface EfoTraitsListApiResponse extends ApiResponse {
5-
65
_embedded: {
76
efoTraits: EfoTrait[];
87
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Publication } from '../../publication';
2+
3+
export interface EpmcImportResult {
4+
publicationDto: Publication;
5+
pmid: string;
6+
status: string;
7+
}

src/app/core/models/rest/api-responses/publicationListApiResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { Publication } from '../../publication';
33

44
export interface PublicationListApiResponse extends ApiResponse {
55
_embedded: {
6-
solrPublicationDToes: Publication[]
6+
publications: Publication[]
77
};
88
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export interface SubmissionMatchingReport {
2+
submissionID: string;
3+
pubMedID: string;
4+
author: string;
5+
doi: string;
6+
cosScore: string;
7+
levDistance: string;
8+
jwScore: string;
9+
}

src/app/core/services/auth.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export class AuthService {
1919
}
2020

2121
isCurator() {
22+
if (environment.WHITELISTED_CURATORS.indexOf(this.getDecodedToken()?.email) > -1) {
23+
return true;
24+
}
2225
return this.getDecodedToken()?.domains?.indexOf('self.GWAS_Curator') > -1;
2326
}
2427

0 commit comments

Comments
 (0)