-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from EBISPOT/develop
Publication import and Submission linking
- Loading branch information
Showing
38 changed files
with
771 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface CurationStatus { | ||
curationStatusId: string; | ||
status: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export interface Curator { | ||
curatorId: string; | ||
firstName: string; | ||
lastName: string; | ||
email: string; | ||
// this is added in the front-end | ||
fullName: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/app/core/models/rest/api-responses/curationStatusListApiResponse.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ApiResponse } from './apiResponse'; | ||
import { CurationStatus } from '../../curationStatus'; | ||
|
||
export interface CurationStatusListApiResponse extends ApiResponse { | ||
_embedded: { | ||
curationStatusDToes: CurationStatus[]; | ||
}; | ||
} |
8 changes: 8 additions & 0 deletions
8
src/app/core/models/rest/api-responses/curatorListApiResponse.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ApiResponse } from './apiResponse'; | ||
import { Curator } from '../../curator'; | ||
|
||
export interface CuratorListApiResponse extends ApiResponse { | ||
_embedded: { | ||
curatorDToes: Curator[]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Publication } from '../../publication'; | ||
|
||
export interface EpmcImportResult { | ||
publicationDto: Publication; | ||
pmid: string; | ||
status: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export interface SubmissionMatchingReport { | ||
submissionID: string; | ||
pubMedID: string; | ||
author: string; | ||
doi: string; | ||
cosScore: string; | ||
levDistance: string; | ||
jwScore: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ture/publication/components/check-submission-dialog/check-submission-dialog.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.ellipsis-col { | ||
overflow: hidden; | ||
max-width: 200px; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} | ||
|
||
td, th { | ||
padding: 7px !important; | ||
text-align: left;; | ||
} | ||
|
||
.loading-shade { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
bottom: 0; | ||
right: 0; | ||
background: rgba(0, 0, 0, 0.15); | ||
z-index: 1; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} |
62 changes: 62 additions & 0 deletions
62
...ure/publication/components/check-submission-dialog/check-submission-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<h2 mat-dialog-title>Potential matches for PMID {{pmid}}</h2> | ||
<h4 *ngIf="author">{{author}}</h4> | ||
<h4 *ngIf="title">{{title}}</h4> | ||
<mat-dialog-content class="mat-typography"> | ||
<div class="relative"> | ||
<div *ngIf="loadingInProgress" class="loading-shade"> | ||
<mat-spinner></mat-spinner> | ||
</div> | ||
<mat-checkbox class="mt-2" (change)="filter($event)">Include submissions having PMID</mat-checkbox> | ||
<table mat-table [dataSource]="dataSource" class="w-full" matSort> | ||
<ng-container matColumnDef="pubMedID"> | ||
<th mat-header-cell *matHeaderCellDef>PMID</th> | ||
<td mat-cell *matCellDef="let row">{{row.pubMedID || 'NA'}}</td> | ||
</ng-container> | ||
<ng-container matColumnDef="submissionId"> | ||
<th mat-header-cell *matHeaderCellDef>SubmissionId</th> | ||
<td mat-cell *matCellDef="let row">{{row.submissionID}}</td> | ||
</ng-container> | ||
<ng-container matColumnDef="author"> | ||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Author</th> | ||
<td mat-cell *matCellDef="let row">{{row.author}}</td> | ||
</ng-container> | ||
<ng-container matColumnDef="title"> | ||
<th mat-header-cell *matHeaderCellDef>Title</th> | ||
<td mat-cell *matCellDef="let row" class="ellipsis-col"> | ||
<span matTooltip="{{row.title}}" matTooltipClass="mat-tooltip">{{row.title || 'NA'}}</span> | ||
</td> | ||
</ng-container> | ||
<ng-container matColumnDef="doi"> | ||
<th mat-header-cell *matHeaderCellDef>DOI</th> | ||
<td mat-cell *matCellDef="let row"> | ||
<a *ngIf="row.doi" mat-button [href]="row.doi" target="_blank"> | ||
Open DOI <mat-icon color="primary" style="font-size: 20px">open_in_new</mat-icon> | ||
</a> | ||
</td> | ||
</ng-container> | ||
<ng-container matColumnDef="cosineScore"> | ||
<th mat-header-cell *matHeaderCellDef>Cosine Score</th> | ||
<td mat-cell *matCellDef="let row">{{row.cosScore}}</td> | ||
</ng-container> | ||
<ng-container matColumnDef="linkSubmission"> | ||
<th mat-header-cell *matHeaderCellDef></th> | ||
<td mat-cell *matCellDef="let row"> | ||
<button mat-raised-button color="primary" [disabled]="row.pubMedID != null" (click)="linkSubmission(row.submissionID, row.author)"> | ||
Link submission | ||
</button> | ||
</td> | ||
</ng-container> | ||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> | ||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> | ||
<tr class="mat-row" *matNoDataRow> | ||
<td class="mat-cell text-center" colspan="9999"> | ||
<h3>No submissions found for PMID</h3> | ||
</td> | ||
</tr> | ||
</table> | ||
<mat-paginator [length]="resultsLength" [pageSizeOptions]="[5, 10, 20]" showFirstLastButtons></mat-paginator> | ||
</div> | ||
</mat-dialog-content> | ||
<div mat-dialog-actions> | ||
<button mat-button mat-dialog-close>Close</button> | ||
</div> |
25 changes: 25 additions & 0 deletions
25
.../publication/components/check-submission-dialog/check-submission-dialog.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { CheckSubmissionDialogComponent } from './check-submission-dialog.component'; | ||
|
||
describe('CheckSubmissionDialogComponent', () => { | ||
let component: CheckSubmissionDialogComponent; | ||
let fixture: ComponentFixture<CheckSubmissionDialogComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ CheckSubmissionDialogComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(CheckSubmissionDialogComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.