mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
refactor
This commit is contained in:
@@ -22,7 +22,7 @@ export interface QualityAssuranceEventMessageObject {
|
||||
/**
|
||||
* The interface representing the Quality Assurance event message
|
||||
*/
|
||||
export interface OpenaireQualityAssuranceEventMessageObject {
|
||||
export interface SourceQualityAssuranceEventMessageObject {
|
||||
/**
|
||||
* The type of 'value'
|
||||
*/
|
||||
@@ -69,9 +69,9 @@ export interface OpenaireQualityAssuranceEventMessageObject {
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* The OPENAIRE ID.
|
||||
* The Source ID.
|
||||
*/
|
||||
openaireId: string;
|
||||
sourceId: string;
|
||||
|
||||
/**
|
||||
* The PID href.
|
||||
@@ -136,7 +136,7 @@ export class QualityAssuranceEventObject implements CacheableObject {
|
||||
* The suggestion data. Data may vary depending on the source
|
||||
*/
|
||||
@autoserialize
|
||||
message: OpenaireQualityAssuranceEventMessageObject;
|
||||
message: SourceQualityAssuranceEventMessageObject;
|
||||
|
||||
/**
|
||||
* The type of this ConfigObject
|
||||
|
@@ -85,7 +85,7 @@
|
||||
</p>
|
||||
<p>
|
||||
<span class="small">{{'quality-assurance.event.table.project' | translate}}</span><br>
|
||||
<a href="{{openAireUrl}}{{ eventElement.event.message.openaireId}}" rel="noopener noreferrer" target="_blank">{{eventElement.event.message.title}}</a>
|
||||
<a href="{{sourceUrlForProjectSearch}}{{ eventElement.event.message.sourceId}}" rel="noopener noreferrer" target="_blank">{{eventElement.event.message.title}}</a>
|
||||
</p>
|
||||
<p>
|
||||
<span *ngIf="eventElement.event.message.acronym"><span class="small">{{'quality-assurance.event.table.acronym' | translate}}</span> <span class="badge badge-info">{{eventElement.event.message.acronym}}</span><br></span>
|
||||
|
@@ -10,7 +10,7 @@ import { SortDirection, SortOptions } from '../../../core/cache/models/sort-opti
|
||||
import { PaginatedList } from '../../../core/data/paginated-list.model';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import {
|
||||
OpenaireQualityAssuranceEventMessageObject,
|
||||
SourceQualityAssuranceEventMessageObject,
|
||||
QualityAssuranceEventObject
|
||||
} from '../../../core/notifications/qa/models/quality-assurance-event.model';
|
||||
import {
|
||||
@@ -97,9 +97,9 @@ export class QualityAssuranceEventsComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
public showMore = false;
|
||||
/**
|
||||
* The Open Aire base url for project search
|
||||
* The quality assurance source base url for project search
|
||||
*/
|
||||
public openAireUrl = environment.qualityAssuranceConfig.openAireUrl;
|
||||
public sourceUrlForProjectSearch = environment.qualityAssuranceConfig.sourceUrlForProjectSearch;
|
||||
/**
|
||||
* The FindListOptions object
|
||||
*/
|
||||
@@ -332,7 +332,7 @@ export class QualityAssuranceEventsComponent implements OnInit, OnDestroy {
|
||||
* Check if the event has a valid href.
|
||||
* @param event
|
||||
*/
|
||||
public hasPIDHref(event: OpenaireQualityAssuranceEventMessageObject): boolean {
|
||||
public hasPIDHref(event: SourceQualityAssuranceEventMessageObject): boolean {
|
||||
return this.getPIDHref(event) !== null;
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ export class QualityAssuranceEventsComponent implements OnInit, OnDestroy {
|
||||
* Get the event pid href.
|
||||
* @param event
|
||||
*/
|
||||
public getPIDHref(event: OpenaireQualityAssuranceEventMessageObject): string {
|
||||
public getPIDHref(event: SourceQualityAssuranceEventMessageObject): string {
|
||||
return event.pidHref;
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
|
||||
import { SearchService } from '../../../core/shared/search/search.service';
|
||||
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||
import {
|
||||
OpenaireQualityAssuranceEventMessageObject,
|
||||
SourceQualityAssuranceEventMessageObject,
|
||||
QualityAssuranceEventObject,
|
||||
} from '../../../core/notifications/qa/models/quality-assurance-event.model';
|
||||
import { hasValue, isNotEmpty } from '../../../shared/empty.util';
|
||||
@@ -180,7 +180,7 @@ export class ProjectEntryImportModalComponent implements OnInit {
|
||||
public ngOnInit(): void {
|
||||
this.pagination = Object.assign(new PaginationComponentOptions(), { id: 'notifications-project-bound', pageSize: this.pageSize });
|
||||
this.projectTitle = (this.externalSourceEntry.projectTitle !== null) ? this.externalSourceEntry.projectTitle
|
||||
: (this.externalSourceEntry.event.message as OpenaireQualityAssuranceEventMessageObject).title;
|
||||
: (this.externalSourceEntry.event.message as SourceQualityAssuranceEventMessageObject).title;
|
||||
this.searchOptions = Object.assign(new PaginatedSearchOptions(
|
||||
{
|
||||
configuration: this.configuration,
|
||||
|
@@ -1476,7 +1476,7 @@ export const qualityAssuranceEventObjectMissingPid: QualityAssuranceEventObject
|
||||
value: '10.18848/1447-9494/cgp/v15i09/45934',
|
||||
pidHref: 'https://doi.org/10.18848/1447-9494/cgp/v15i09/45934',
|
||||
abstract: null,
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: null,
|
||||
code: null,
|
||||
funder: null,
|
||||
@@ -1513,7 +1513,7 @@ export const qualityAssuranceEventObjectMissingPid2: QualityAssuranceEventObject
|
||||
value: 'http://thesis2.sba.units.it/store/handle/item/12238',
|
||||
pidHref:'http://thesis2.sba.units.it/store/handle/item/12238',
|
||||
abstract: null,
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: null,
|
||||
code: null,
|
||||
funder: null,
|
||||
@@ -1550,7 +1550,7 @@ export const qualityAssuranceEventObjectMissingPid3: QualityAssuranceEventObject
|
||||
value: '10.4324/9780203408889',
|
||||
pidHref: 'https://doi.org/10.4324/9780203408889',
|
||||
abstract: null,
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: null,
|
||||
code: null,
|
||||
funder: null,
|
||||
@@ -1587,7 +1587,7 @@ export const qualityAssuranceEventObjectMissingPid4: QualityAssuranceEventObject
|
||||
value: '10.1080/13698230.2018.1430104',
|
||||
pidHref: 'https://doi.org/10.1080/13698230.2018.1430104',
|
||||
abstract: null,
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: null,
|
||||
code: null,
|
||||
funder: null,
|
||||
@@ -1624,7 +1624,7 @@ export const qualityAssuranceEventObjectMissingPid5: QualityAssuranceEventObject
|
||||
value: 'http://thesis2.sba.units.it/store/handle/item/12477',
|
||||
pidHref:'http://thesis2.sba.units.it/store/handle/item/12477',
|
||||
abstract: null,
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: null,
|
||||
code: null,
|
||||
funder: null,
|
||||
@@ -1661,7 +1661,7 @@ export const qualityAssuranceEventObjectMissingPid6: QualityAssuranceEventObject
|
||||
value: '10.1111/j.1475-4975.2004.00098.x',
|
||||
pidHref: 'https://doi.org/10.1111/j.1475-4975.2004.00098.x',
|
||||
abstract: null,
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: null,
|
||||
code: null,
|
||||
funder: null,
|
||||
@@ -1698,7 +1698,7 @@ export const qualityAssuranceEventObjectMissingAbstract: QualityAssuranceEventOb
|
||||
value: null,
|
||||
pidHref: null,
|
||||
abstract: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla scelerisque vestibulum tellus sed lacinia. Aenean vitae sapien a quam congue ultrices. Sed vehicula sollicitudin ligula, vitae lacinia velit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla scelerisque vestibulum tellus sed lacinia. Aenean vitae sapien a quam congue ultrices. Sed vehicula sollicitudin ligula, vitae lacinia velit.',
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: null,
|
||||
code: null,
|
||||
funder: null,
|
||||
@@ -1735,7 +1735,7 @@ export const qualityAssuranceEventObjectMissingProjectFound: QualityAssuranceEve
|
||||
value: null,
|
||||
pidHref: null,
|
||||
abstract: null,
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: 'PAThs',
|
||||
code: '687567',
|
||||
funder: 'EC',
|
||||
@@ -1772,7 +1772,7 @@ export const qualityAssuranceEventObjectMissingProjectNotFound: QualityAssurance
|
||||
value: null,
|
||||
pidHref: null,
|
||||
abstract: null,
|
||||
openaireId: null,
|
||||
sourceId: null,
|
||||
acronym: 'PAThs',
|
||||
code: '687567B',
|
||||
funder: 'EC',
|
||||
|
@@ -435,7 +435,7 @@ export class DefaultAppConfig implements AppConfig {
|
||||
};
|
||||
|
||||
qualityAssuranceConfig: QualityAssuranceConfig = {
|
||||
openAireUrl: 'https://explore.openaire.eu/search/project?projectId=',
|
||||
sourceUrlForProjectSearch: 'https://explore.openaire.eu/search/project?projectId=',
|
||||
pageSize: 5,
|
||||
};
|
||||
}
|
||||
|
@@ -7,9 +7,9 @@ import { Config } from './config.interface';
|
||||
export class QualityAssuranceConfig implements Config {
|
||||
|
||||
/**
|
||||
* Url for OAIRE resources
|
||||
* Url for project search on quality assurance resource
|
||||
*/
|
||||
public openAireUrl: string;
|
||||
public sourceUrlForProjectSearch: string;
|
||||
/**
|
||||
* default count of QA sources to load
|
||||
*/
|
||||
|
@@ -307,7 +307,7 @@ export const environment: BuildConfig = {
|
||||
sortDirection:'ASC',
|
||||
},
|
||||
qualityAssuranceConfig: {
|
||||
openAireUrl: 'https://explore.openaire.eu/search/project?projectId=',
|
||||
sourceUrlForProjectSearch: 'https://explore.openaire.eu/search/project?projectId=',
|
||||
pageSize: 5,
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user