mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-5249] Fixed suggestion page
This commit is contained in:
@@ -39,7 +39,7 @@ import { CSSVariableService } from '../../shared/sass-helper/sass-helper.service
|
|||||||
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
|
||||||
import { FeatureID } from '../../core/data/feature-authorization/feature-id';
|
import { FeatureID } from '../../core/data/feature-authorization/feature-id';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import {NOTIFICATIONS_RECITER_SUGGESTION_PATH} from "../admin-notifications/admin-notifications-routing-paths";
|
import {NOTIFICATIONS_RECITER_SUGGESTION_PATH} from '../admin-notifications/admin-notifications-routing-paths';
|
||||||
import { MenuID } from '../../shared/menu/menu-id.model';
|
import { MenuID } from '../../shared/menu/menu-id.model';
|
||||||
import { MenuItemType } from '../../shared/menu/menu-item-type.model';
|
import { MenuItemType } from '../../shared/menu/menu-item-type.model';
|
||||||
|
|
||||||
|
@@ -168,7 +168,7 @@ import { OpenaireSuggestionSource } from './openaire/reciter-suggestions/models/
|
|||||||
import { ResearcherProfileService } from './profile/researcher-profile.service';
|
import { ResearcherProfileService } from './profile/researcher-profile.service';
|
||||||
import { ProfileClaimService } from '../profile-page/profile-claim/profile-claim.service';
|
import { ProfileClaimService } from '../profile-page/profile-claim/profile-claim.service';
|
||||||
import { ResearcherProfile } from './profile/model/researcher-profile.model';
|
import { ResearcherProfile } from './profile/model/researcher-profile.model';
|
||||||
import {SubmissionAccessesModel} from "./config/models/config-submission-accesses.model";
|
import {SubmissionAccessesModel} from './config/models/config-submission-accesses.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When not in production, endpoint responses can be mocked for testing purposes
|
* When not in production, endpoint responses can be mocked for testing purposes
|
||||||
|
@@ -5,7 +5,7 @@ import { excludeFromEquals } from '../../../utilities/equals.decorators';
|
|||||||
import { ResourceType } from '../../../shared/resource-type';
|
import { ResourceType } from '../../../shared/resource-type';
|
||||||
import { HALLink } from '../../../shared/hal-link.model';
|
import { HALLink } from '../../../shared/hal-link.model';
|
||||||
import { typedObject } from '../../../cache/builders/build-decorators';
|
import { typedObject } from '../../../cache/builders/build-decorators';
|
||||||
import {CacheableObject} from "../../../cache/cacheable-object.model";
|
import {CacheableObject} from '../../../cache/cacheable-object.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The interface representing the Suggestion Source model
|
* The interface representing the Suggestion Source model
|
||||||
|
@@ -5,7 +5,7 @@ import { excludeFromEquals } from '../../../utilities/equals.decorators';
|
|||||||
import { ResourceType } from '../../../shared/resource-type';
|
import { ResourceType } from '../../../shared/resource-type';
|
||||||
import { HALLink } from '../../../shared/hal-link.model';
|
import { HALLink } from '../../../shared/hal-link.model';
|
||||||
import { typedObject } from '../../../cache/builders/build-decorators';
|
import { typedObject } from '../../../cache/builders/build-decorators';
|
||||||
import {CacheableObject} from "../../../cache/cacheable-object.model";
|
import {CacheableObject} from '../../../cache/cacheable-object.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The interface representing the Suggestion Target model
|
* The interface representing the Suggestion Target model
|
||||||
|
@@ -6,7 +6,7 @@ import { ResourceType } from '../../../shared/resource-type';
|
|||||||
import { HALLink } from '../../../shared/hal-link.model';
|
import { HALLink } from '../../../shared/hal-link.model';
|
||||||
import { typedObject } from '../../../cache/builders/build-decorators';
|
import { typedObject } from '../../../cache/builders/build-decorators';
|
||||||
import { MetadataMap, MetadataMapSerializer } from '../../../shared/metadata.models';
|
import { MetadataMap, MetadataMapSerializer } from '../../../shared/metadata.models';
|
||||||
import {CacheableObject} from "../../../cache/cacheable-object.model";
|
import {CacheableObject} from '../../../cache/cacheable-object.model';
|
||||||
|
|
||||||
export interface SuggestionEvidences {
|
export interface SuggestionEvidences {
|
||||||
[sectionId: string]: {
|
[sectionId: string]: {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
@@ -22,8 +23,8 @@ import { OpenaireSuggestionTarget } from './models/openaire-suggestion-target.mo
|
|||||||
import { OpenaireSuggestion } from './models/openaire-suggestion.model';
|
import { OpenaireSuggestion } from './models/openaire-suggestion.model';
|
||||||
import { RequestParam } from '../../cache/models/request-param.model';
|
import { RequestParam } from '../../cache/models/request-param.model';
|
||||||
import { NoContent } from '../../shared/NoContent.model';
|
import { NoContent } from '../../shared/NoContent.model';
|
||||||
import {CoreState} from "../../core-state.model";
|
import {CoreState} from '../../core-state.model';
|
||||||
import {FindListOptions} from "../../data/find-list-options.model";
|
import {FindListOptions} from '../../data/find-list-options.model';
|
||||||
|
|
||||||
/* tslint:disable:max-classes-per-file */
|
/* tslint:disable:max-classes-per-file */
|
||||||
|
|
||||||
|
@@ -17,10 +17,10 @@ import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
|||||||
import { RequestParam } from '../cache/models/request-param.model';
|
import { RequestParam } from '../cache/models/request-param.model';
|
||||||
import { CoreState } from '../core-state.model';
|
import { CoreState } from '../core-state.model';
|
||||||
import { FindListOptions } from '../data/find-list-options.model';
|
import { FindListOptions } from '../data/find-list-options.model';
|
||||||
import {HttpOptions} from "../dspace-rest/dspace-rest.service";
|
import {HttpOptions} from '../dspace-rest/dspace-rest.service';
|
||||||
import {find, map} from "rxjs/operators";
|
import {find, map} from 'rxjs/operators';
|
||||||
import {PostRequest} from "../data/request.models";
|
import {PostRequest} from '../data/request.models';
|
||||||
import {hasValue} from "../../shared/empty.util";
|
import {hasValue} from '../../shared/empty.util';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A service that provides methods to make REST requests with workspaceitems endpoint.
|
* A service that provides methods to make REST requests with workspaceitems endpoint.
|
||||||
|
@@ -18,7 +18,7 @@ import { SuggestionsPopupComponent } from './reciter-suggestions/suggestions-pop
|
|||||||
import { SuggestionsNotificationComponent } from './reciter-suggestions/suggestions-notification/suggestions-notification.component';
|
import { SuggestionsNotificationComponent } from './reciter-suggestions/suggestions-notification/suggestions-notification.component';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { SearchModule } from '../shared/search/search.module';
|
import { SearchModule } from '../shared/search/search.module';
|
||||||
import {openaireEffects} from "./openaire.effects";
|
import {openaireEffects} from './openaire.effects';
|
||||||
|
|
||||||
const MODULES = [
|
const MODULES = [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@@ -2,7 +2,7 @@ import {createFeatureSelector, createSelector, MemoizedSelector} from '@ngrx/sto
|
|||||||
import { openaireSelector, OpenaireState } from '../openaire.reducer';
|
import { openaireSelector, OpenaireState } from '../openaire.reducer';
|
||||||
import { OpenaireSuggestionTarget } from '../../core/openaire/reciter-suggestions/models/openaire-suggestion-target.model';
|
import { OpenaireSuggestionTarget } from '../../core/openaire/reciter-suggestions/models/openaire-suggestion-target.model';
|
||||||
import { SuggestionTargetState } from './suggestion-targets/suggestion-targets.reducer';
|
import { SuggestionTargetState } from './suggestion-targets/suggestion-targets.reducer';
|
||||||
import {subStateSelector} from "../../submission/selectors";
|
import {subStateSelector} from '../../submission/selectors';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Reciter Suggestion Target state.
|
* Returns the Reciter Suggestion Target state.
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../../../shared/ngrx/type';
|
import { type } from '../../../shared/ngrx/type';
|
||||||
import { OpenaireSuggestionTarget } from '../../../core/openaire/reciter-suggestions/models/openaire-suggestion-target.model';
|
import { OpenaireSuggestionTarget } from '../../../core/openaire/reciter-suggestions/models/openaire-suggestion-target.model';
|
||||||
|
@@ -78,10 +78,10 @@ export class SuggestionTargetsEffects {
|
|||||||
@Effect() refreshUserTargets$ = this.actions$.pipe(
|
@Effect() refreshUserTargets$ = this.actions$.pipe(
|
||||||
ofType(SuggestionTargetActionTypes.REFRESH_USER_SUGGESTIONS),
|
ofType(SuggestionTargetActionTypes.REFRESH_USER_SUGGESTIONS),
|
||||||
switchMap((action: RefreshUserSuggestionsAction) => {
|
switchMap((action: RefreshUserSuggestionsAction) => {
|
||||||
return this.store$.select((state: any) => state.core.auth.user)
|
return this.store$.select((state: any) => state.core.auth.userId)
|
||||||
.pipe(
|
.pipe(
|
||||||
switchMap((user: EPerson) => {
|
switchMap((userId: string) => {
|
||||||
return this.suggestionsService.retrieveCurrentUserSuggestions(user.uuid)
|
return this.suggestionsService.retrieveCurrentUserSuggestions(userId)
|
||||||
.pipe(
|
.pipe(
|
||||||
map((suggestionTargets: OpenaireSuggestionTarget[]) => new AddUserSuggestionsAction(suggestionTargets)),
|
map((suggestionTargets: OpenaireSuggestionTarget[]) => new AddUserSuggestionsAction(suggestionTargets)),
|
||||||
catchError((errors) => of(errors))
|
catchError((errors) => of(errors))
|
||||||
|
@@ -25,8 +25,8 @@ import { TranslateService } from '@ngx-translate/core';
|
|||||||
import { NoContent } from '../../core/shared/NoContent.model';
|
import { NoContent } from '../../core/shared/NoContent.model';
|
||||||
import { environment } from '../../../environments/environment';
|
import { environment } from '../../../environments/environment';
|
||||||
import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model';
|
import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model';
|
||||||
import {FindListOptions} from "../../core/data/find-list-options.model";
|
import {FindListOptions} from '../../core/data/find-list-options.model';
|
||||||
import {SuggestionConfig} from "../../../config/layout-config.interfaces";
|
import {SuggestionConfig} from '../../../config/layout-config.interfaces';
|
||||||
|
|
||||||
export interface SuggestionBulkResult {
|
export interface SuggestionBulkResult {
|
||||||
success: number;
|
success: number;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core';
|
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||||
import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router';
|
import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router';
|
||||||
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||||
import { RemoteData } from '../../../core/data/remote-data';
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
@@ -21,11 +21,22 @@ export enum SelectorActionType {
|
|||||||
template: ''
|
template: ''
|
||||||
})
|
})
|
||||||
export abstract class DSOSelectorModalWrapperComponent implements OnInit {
|
export abstract class DSOSelectorModalWrapperComponent implements OnInit {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The discovery configuration.
|
||||||
|
*/
|
||||||
|
@Input() configuration = 'default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current page's DSO
|
* The current page's DSO
|
||||||
*/
|
*/
|
||||||
@Input() dsoRD: RemoteData<DSpaceObject>;
|
@Input() dsoRD: RemoteData<DSpaceObject>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Representing if component should emit value of selected entries or navigate
|
||||||
|
*/
|
||||||
|
@Input() emitOnly = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional header to display above the selection list
|
* Optional header to display above the selection list
|
||||||
* Supports i18n keys
|
* Supports i18n keys
|
||||||
@@ -47,6 +58,11 @@ export abstract class DSOSelectorModalWrapperComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
action: SelectorActionType;
|
action: SelectorActionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event emitted when a DSO entry is selected if emitOnly is set to true
|
||||||
|
*/
|
||||||
|
@Output() select: EventEmitter<DSpaceObject> = new EventEmitter<DSpaceObject>();
|
||||||
|
|
||||||
constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) {
|
constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +101,11 @@ export abstract class DSOSelectorModalWrapperComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
selectObject(dso: DSpaceObject) {
|
selectObject(dso: DSpaceObject) {
|
||||||
this.close();
|
this.close();
|
||||||
this.navigate(dso);
|
if (this.emitOnly) {
|
||||||
|
this.select.emit(dso);
|
||||||
|
} else {
|
||||||
|
this.navigate(dso);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,17 +1,5 @@
|
|||||||
import { of as observableOf } from 'rxjs';
|
|
||||||
import { ResourceType } from '../../core/shared/resource-type';
|
|
||||||
import { OpenaireBrokerTopicObject } from '../../core/openaire/broker/models/openaire-broker-topic.model';
|
|
||||||
import { OpenaireBrokerEventObject } from '../../core/openaire/broker/models/openaire-broker-event.model';
|
|
||||||
import { OpenaireBrokerTopicRestService } from '../../core/openaire/broker/topics/openaire-broker-topic-rest.service';
|
|
||||||
import { OpenaireBrokerEventRestService } from '../../core/openaire/broker/events/openaire-broker-event-rest.service';
|
|
||||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||||
import { OpenaireStateService } from '../../openaire/openaire-state.service';
|
|
||||||
import { Item } from '../../core/shared/item.model';
|
import { Item } from '../../core/shared/item.model';
|
||||||
import {
|
|
||||||
createNoContentRemoteDataObject$,
|
|
||||||
createSuccessfulRemoteDataObject,
|
|
||||||
createSuccessfulRemoteDataObject$
|
|
||||||
} from '../remote-data.utils';
|
|
||||||
import { SearchResult } from '../search/models/search-result.model';
|
import { SearchResult } from '../search/models/search-result.model';
|
||||||
import { SuggestionsService } from '../../openaire/reciter-suggestions/suggestions.service';
|
import { SuggestionsService } from '../../openaire/reciter-suggestions/suggestions.service';
|
||||||
|
|
||||||
@@ -1330,414 +1318,6 @@ export const OpenaireMockDspaceObject: SearchResult<DSpaceObject> = Object.assig
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Topics
|
|
||||||
// -------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
export const openaireBrokerTopicObjectMorePid: OpenaireBrokerTopicObject = {
|
|
||||||
type: new ResourceType('nbtopic'),
|
|
||||||
id: 'ENRICH!MORE!PID',
|
|
||||||
name: 'ENRICH/MORE/PID',
|
|
||||||
lastEvent: '2020/10/09 10:11 UTC',
|
|
||||||
totalEvents: 33,
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbtopics/ENRICH!MORE!PID'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerTopicObjectMoreAbstract: OpenaireBrokerTopicObject = {
|
|
||||||
type: new ResourceType('nbtopic'),
|
|
||||||
id: 'ENRICH!MORE!ABSTRACT',
|
|
||||||
name: 'ENRICH/MORE/ABSTRACT',
|
|
||||||
lastEvent: '2020/09/08 21:14 UTC',
|
|
||||||
totalEvents: 5,
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbtopics/ENRICH!MORE!ABSTRACT'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerTopicObjectMissingPid: OpenaireBrokerTopicObject = {
|
|
||||||
type: new ResourceType('nbtopic'),
|
|
||||||
id: 'ENRICH!MISSING!PID',
|
|
||||||
name: 'ENRICH/MISSING/PID',
|
|
||||||
lastEvent: '2020/10/01 07:36 UTC',
|
|
||||||
totalEvents: 4,
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbtopics/ENRICH!MISSING!PID'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerTopicObjectMissingAbstract: OpenaireBrokerTopicObject = {
|
|
||||||
type: new ResourceType('nbtopic'),
|
|
||||||
id: 'ENRICH!MISSING!ABSTRACT',
|
|
||||||
name: 'ENRICH/MISSING/ABSTRACT',
|
|
||||||
lastEvent: '2020/10/08 16:14 UTC',
|
|
||||||
totalEvents: 71,
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbtopics/ENRICH!MISSING!ABSTRACT'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerTopicObjectMissingAcm: OpenaireBrokerTopicObject = {
|
|
||||||
type: new ResourceType('nbtopic'),
|
|
||||||
id: 'ENRICH!MISSING!SUBJECT!ACM',
|
|
||||||
name: 'ENRICH/MISSING/SUBJECT/ACM',
|
|
||||||
lastEvent: '2020/09/21 17:51 UTC',
|
|
||||||
totalEvents: 18,
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbtopics/ENRICH!MISSING!SUBJECT!ACM'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerTopicObjectMissingProject: OpenaireBrokerTopicObject = {
|
|
||||||
type: new ResourceType('nbtopic'),
|
|
||||||
id: 'ENRICH!MISSING!PROJECT',
|
|
||||||
name: 'ENRICH/MISSING/PROJECT',
|
|
||||||
lastEvent: '2020/09/17 10:28 UTC',
|
|
||||||
totalEvents: 6,
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbtopics/ENRICH!MISSING!PROJECT'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Events
|
|
||||||
// -------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingPid: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174001',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174001',
|
|
||||||
type: new ResourceType('nbevent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/21486',
|
|
||||||
title: 'Index nominum et rerum',
|
|
||||||
trust: 0.375,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: 'doi',
|
|
||||||
value: '10.18848/1447-9494/cgp/v15i09/45934',
|
|
||||||
abstract: null,
|
|
||||||
openaireId: null,
|
|
||||||
acronym: null,
|
|
||||||
code: null,
|
|
||||||
funder: null,
|
|
||||||
fundingProgram: null,
|
|
||||||
jurisdiction: null,
|
|
||||||
title: null
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174001',
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174001/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174001/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: observableOf(createSuccessfulRemoteDataObject(ItemMockPid1)),
|
|
||||||
related: observableOf(createSuccessfulRemoteDataObject(ItemMockPid10))
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingPid2: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174004',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174004',
|
|
||||||
type: new ResourceType('openaireBrokerEvent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/21486',
|
|
||||||
title: 'UNA NUOVA RILETTURA DELL\u0027 ARISTOTELE DI FRANZ BRENTANO ALLA LUCE DI ALCUNI INEDITI',
|
|
||||||
trust: 1.0,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: 'urn',
|
|
||||||
value: 'http://thesis2.sba.units.it/store/handle/item/12238',
|
|
||||||
abstract: null,
|
|
||||||
openaireId: null,
|
|
||||||
acronym: null,
|
|
||||||
code: null,
|
|
||||||
funder: null,
|
|
||||||
fundingProgram: null,
|
|
||||||
jurisdiction: null,
|
|
||||||
title: null
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174004'
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174004/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174004/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: observableOf(createSuccessfulRemoteDataObject(ItemMockPid2)),
|
|
||||||
related: observableOf(createSuccessfulRemoteDataObject(ItemMockPid10))
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingPid3: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174005',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174005',
|
|
||||||
type: new ResourceType('openaireBrokerEvent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/554',
|
|
||||||
title: 'Sustainable development',
|
|
||||||
trust: 0.375,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: 'doi',
|
|
||||||
value: '10.4324/9780203408889',
|
|
||||||
abstract: null,
|
|
||||||
openaireId: null,
|
|
||||||
acronym: null,
|
|
||||||
code: null,
|
|
||||||
funder: null,
|
|
||||||
fundingProgram: null,
|
|
||||||
jurisdiction: null,
|
|
||||||
title: null
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174005'
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174005/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174005/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: observableOf(createSuccessfulRemoteDataObject(ItemMockPid3)),
|
|
||||||
related: observableOf(createSuccessfulRemoteDataObject(ItemMockPid10))
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingPid4: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174006',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174006',
|
|
||||||
type: new ResourceType('openaireBrokerEvent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/10787',
|
|
||||||
title: 'Reply to Critics',
|
|
||||||
trust: 1.0,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: 'doi',
|
|
||||||
value: '10.1080/13698230.2018.1430104',
|
|
||||||
abstract: null,
|
|
||||||
openaireId: null,
|
|
||||||
acronym: null,
|
|
||||||
code: null,
|
|
||||||
funder: null,
|
|
||||||
fundingProgram: null,
|
|
||||||
jurisdiction: null,
|
|
||||||
title: null
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174006'
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174006/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174006/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: observableOf(createSuccessfulRemoteDataObject(ItemMockPid4)),
|
|
||||||
related: observableOf(createSuccessfulRemoteDataObject(ItemMockPid10))
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingPid5: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174007',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174007',
|
|
||||||
type: new ResourceType('openaireBrokerEvent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/11339',
|
|
||||||
title: 'PROGETTAZIONE, SINTESI E VALUTAZIONE DELL\u0027ATTIVITA\u0027 ANTIMICOBATTERICA ED ANTIFUNGINA DI NUOVI DERIVATI ETEROCICLICI',
|
|
||||||
trust: 0.375,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: 'urn',
|
|
||||||
value: 'http://thesis2.sba.units.it/store/handle/item/12477',
|
|
||||||
abstract: null,
|
|
||||||
openaireId: null,
|
|
||||||
acronym: null,
|
|
||||||
code: null,
|
|
||||||
funder: null,
|
|
||||||
fundingProgram: null,
|
|
||||||
jurisdiction: null,
|
|
||||||
title: null
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174007'
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174007/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174007/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: observableOf(createSuccessfulRemoteDataObject(ItemMockPid5)),
|
|
||||||
related: observableOf(createSuccessfulRemoteDataObject(ItemMockPid10))
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingPid6: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174008',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174008',
|
|
||||||
type: new ResourceType('openaireBrokerEvent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/29860',
|
|
||||||
title: 'Donald Davidson',
|
|
||||||
trust: 0.375,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: 'doi',
|
|
||||||
value: '10.1111/j.1475-4975.2004.00098.x',
|
|
||||||
abstract: null,
|
|
||||||
openaireId: null,
|
|
||||||
acronym: null,
|
|
||||||
code: null,
|
|
||||||
funder: null,
|
|
||||||
fundingProgram: null,
|
|
||||||
jurisdiction: null,
|
|
||||||
title: null
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174008'
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174008/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174008/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: observableOf(createSuccessfulRemoteDataObject(ItemMockPid6)),
|
|
||||||
related: observableOf(createSuccessfulRemoteDataObject(ItemMockPid10))
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingAbstract: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174009',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174009',
|
|
||||||
type: new ResourceType('openaireBrokerEvent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/21110',
|
|
||||||
title: 'Missing abstract article',
|
|
||||||
trust: 0.751,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: null,
|
|
||||||
value: 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,
|
|
||||||
acronym: null,
|
|
||||||
code: null,
|
|
||||||
funder: null,
|
|
||||||
fundingProgram: null,
|
|
||||||
jurisdiction: null,
|
|
||||||
title: null
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174009'
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174009/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174009/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: observableOf(createSuccessfulRemoteDataObject(ItemMockPid7)),
|
|
||||||
related: observableOf(createSuccessfulRemoteDataObject(ItemMockPid10))
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingProjectFound: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174002',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174002',
|
|
||||||
type: new ResourceType('openaireBrokerEvent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/21838',
|
|
||||||
title: 'Egypt, crossroad of translations and literary interweavings (3rd-6th centuries). A reconsideration of earlier Coptic literature',
|
|
||||||
trust: 1.0,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: null,
|
|
||||||
value: null,
|
|
||||||
abstract: null,
|
|
||||||
openaireId: null,
|
|
||||||
acronym: 'PAThs',
|
|
||||||
code: '687567',
|
|
||||||
funder: 'EC',
|
|
||||||
fundingProgram: 'H2020',
|
|
||||||
jurisdiction: 'EU',
|
|
||||||
title: 'Tracking Papyrus and Parchment Paths: An Archaeological Atlas of Coptic Literature.\nLiterary Texts in their Geographical Context: Production, Copying, Usage, Dissemination and Storage'
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174002'
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174002/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174002/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: createSuccessfulRemoteDataObject$(ItemMockPid8),
|
|
||||||
related: createSuccessfulRemoteDataObject$(ItemMockPid10)
|
|
||||||
};
|
|
||||||
|
|
||||||
export const openaireBrokerEventObjectMissingProjectNotFound: OpenaireBrokerEventObject = {
|
|
||||||
id: '123e4567-e89b-12d3-a456-426614174003',
|
|
||||||
uuid: '123e4567-e89b-12d3-a456-426614174003',
|
|
||||||
type: new ResourceType('openaireBrokerEvent'),
|
|
||||||
originalId: 'oai:www.openstarts.units.it:10077/21838',
|
|
||||||
title: 'Morocco, crossroad of translations and literary interweavings (3rd-6th centuries). A reconsideration of earlier Coptic literature',
|
|
||||||
trust: 1.0,
|
|
||||||
eventDate: '2020/10/09 10:11 UTC',
|
|
||||||
status: 'PENDING',
|
|
||||||
message: {
|
|
||||||
type: null,
|
|
||||||
value: null,
|
|
||||||
abstract: null,
|
|
||||||
openaireId: null,
|
|
||||||
acronym: 'PAThs',
|
|
||||||
code: '687567B',
|
|
||||||
funder: 'EC',
|
|
||||||
fundingProgram: 'H2021',
|
|
||||||
jurisdiction: 'EU',
|
|
||||||
title: 'Tracking Unknown Papyrus and Parchment Paths: An Archaeological Atlas of Coptic Literature.\nLiterary Texts in their Geographical Context: Production, Copying, Usage, Dissemination and Storage'
|
|
||||||
},
|
|
||||||
_links: {
|
|
||||||
self: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174003'
|
|
||||||
},
|
|
||||||
target: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174003/target'
|
|
||||||
},
|
|
||||||
related: {
|
|
||||||
href: 'https://rest.api/rest/api/integration/nbevents/123e4567-e89b-12d3-a456-426614174003/related'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
target: createSuccessfulRemoteDataObject$(ItemMockPid9),
|
|
||||||
related: createNoContentRemoteDataObject$()
|
|
||||||
};
|
|
||||||
|
|
||||||
// Classes
|
// Classes
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -1757,31 +1337,6 @@ export function getMockOpenaireStateService(): any {
|
|||||||
dispatchMarkUserSuggestionsAsVisitedAction: jasmine.createSpy('dispatchMarkUserSuggestionsAsVisitedAction')
|
dispatchMarkUserSuggestionsAsVisitedAction: jasmine.createSpy('dispatchMarkUserSuggestionsAsVisitedAction')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Mock for [[OpenaireBrokerTopicRestService]]
|
|
||||||
*/
|
|
||||||
export function getMockOpenaireBrokerTopicRestService(): OpenaireBrokerTopicRestService {
|
|
||||||
return jasmine.createSpyObj('OpenaireBrokerTopicRestService', {
|
|
||||||
getTopics: jasmine.createSpy('getTopics'),
|
|
||||||
getTopic: jasmine.createSpy('getTopic'),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mock for [[OpenaireBrokerEventRestService]]
|
|
||||||
*/
|
|
||||||
export function getMockOpenaireBrokerEventRestService(): OpenaireBrokerEventRestService {
|
|
||||||
return jasmine.createSpyObj('OpenaireBrokerEventRestService', {
|
|
||||||
getEventsByTopic: jasmine.createSpy('getEventsByTopic'),
|
|
||||||
getEvent: jasmine.createSpy('getEvent'),
|
|
||||||
patchEvent: jasmine.createSpy('patchEvent'),
|
|
||||||
boundProject: jasmine.createSpy('boundProject'),
|
|
||||||
removeProject: jasmine.createSpy('removeProject'),
|
|
||||||
clearFindByTopicRequests: jasmine.createSpy('.clearFindByTopicRequests')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mock for [[OpenaireBrokerEventRestService]]
|
* Mock for [[OpenaireBrokerEventRestService]]
|
||||||
*/
|
*/
|
||||||
|
@@ -20,8 +20,8 @@ import { SuggestionTargetsStateService } from '../openaire/reciter-suggestions/s
|
|||||||
import { WorkspaceitemDataService } from '../core/submission/workspaceitem-data.service';
|
import { WorkspaceitemDataService } from '../core/submission/workspaceitem-data.service';
|
||||||
import { PaginationService } from '../core/pagination/pagination.service';
|
import { PaginationService } from '../core/pagination/pagination.service';
|
||||||
import { WorkspaceItem } from '../core/submission/models/workspaceitem.model';
|
import { WorkspaceItem } from '../core/submission/models/workspaceitem.model';
|
||||||
import {FindListOptions} from "../core/data/find-list-options.model";
|
import {FindListOptions} from '../core/data/find-list-options.model';
|
||||||
import {redirectOn4xx} from "../core/shared/authorized.operators";
|
import {redirectOn4xx} from '../core/shared/authorized.operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-suggestion-page',
|
selector: 'ds-suggestion-page',
|
||||||
|
@@ -3033,6 +3033,7 @@
|
|||||||
|
|
||||||
"reciter.suggestion.totalScore": "Total Score",
|
"reciter.suggestion.totalScore": "Total Score",
|
||||||
|
|
||||||
|
"reciter.suggestion.type.oaire": "OpenAIRE",
|
||||||
|
|
||||||
"register-email.title": "New user registration",
|
"register-email.title": "New user registration",
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ import { AuthConfig } from './auth-config.interfaces';
|
|||||||
import { UIServerConfig } from './ui-server-config.interface';
|
import { UIServerConfig } from './ui-server-config.interface';
|
||||||
import { MediaViewerConfig } from './media-viewer-config.interface';
|
import { MediaViewerConfig } from './media-viewer-config.interface';
|
||||||
import { BrowseByConfig } from './browse-by-config.interface';
|
import { BrowseByConfig } from './browse-by-config.interface';
|
||||||
import {SuggestionConfig} from "./layout-config.interfaces";
|
import {SuggestionConfig} from './layout-config.interfaces';
|
||||||
|
|
||||||
interface AppConfig extends Config {
|
interface AppConfig extends Config {
|
||||||
ui: UIServerConfig;
|
ui: UIServerConfig;
|
||||||
|
@@ -14,7 +14,7 @@ import { ServerConfig } from './server-config.interface';
|
|||||||
import { SubmissionConfig } from './submission-config.interface';
|
import { SubmissionConfig } from './submission-config.interface';
|
||||||
import { ThemeConfig } from './theme.model';
|
import { ThemeConfig } from './theme.model';
|
||||||
import { UIServerConfig } from './ui-server-config.interface';
|
import { UIServerConfig } from './ui-server-config.interface';
|
||||||
import {SuggestionConfig} from "./layout-config.interfaces";
|
import {SuggestionConfig} from './layout-config.interfaces';
|
||||||
|
|
||||||
export class DefaultAppConfig implements AppConfig {
|
export class DefaultAppConfig implements AppConfig {
|
||||||
production = false;
|
production = false;
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
import { BuildConfig } from 'src/config/build-config.interface';
|
import { BuildConfig } from 'src/config/build-config.interface';
|
||||||
import { RestRequestMethod } from '../app/core/data/rest-request-method';
|
import { RestRequestMethod } from '../app/core/data/rest-request-method';
|
||||||
import { NotificationAnimationsType } from '../app/shared/notifications/models/notification-animations-type';
|
import { NotificationAnimationsType } from '../app/shared/notifications/models/notification-animations-type';
|
||||||
|
import {SuggestionConfig} from '../config/layout-config.interfaces';
|
||||||
|
|
||||||
export const environment: BuildConfig = {
|
export const environment: BuildConfig = {
|
||||||
production: false,
|
production: false,
|
||||||
@@ -203,6 +204,13 @@ export const environment: BuildConfig = {
|
|||||||
undoTimeout: 10000 // 10 seconds
|
undoTimeout: 10000 // 10 seconds
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
suggestion: [
|
||||||
|
// {
|
||||||
|
// // Use this configuration to map a suggestion import to a specific collection based on the suggestion type.
|
||||||
|
// source: 'suggestionSource',
|
||||||
|
// collectionId: 'collectionUUID'
|
||||||
|
// }
|
||||||
|
],
|
||||||
themes: [
|
themes: [
|
||||||
{
|
{
|
||||||
name: 'full-item-page-theme',
|
name: 'full-item-page-theme',
|
||||||
|
Reference in New Issue
Block a user