mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merged in coar-CST-12145 (pull request #967)
Coar CST-12145 Approved-by: Andrea Bollini
This commit is contained in:
@@ -49,6 +49,21 @@ import { SourceDataResolver } from './admin-quality-assurance-source-page-compon
|
||||
showBreadcrumbsFluid: false
|
||||
}
|
||||
},
|
||||
{
|
||||
canActivate: [ AuthenticatedGuard ],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId/:targetId`,
|
||||
component: AdminQualityAssuranceTopicsPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
openaireQualityAssuranceTopicsParams: AdminQualityAssuranceTopicsPageResolver
|
||||
},
|
||||
data: {
|
||||
title: 'admin.quality-assurance.page.title',
|
||||
breadcrumbKey: 'admin.quality-assurance',
|
||||
showBreadcrumbsFluid: false
|
||||
}
|
||||
},
|
||||
{
|
||||
canActivate: [ AuthenticatedGuard ],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}`,
|
||||
|
@@ -84,6 +84,16 @@ export class QualityAssuranceEventDataService extends IdentifiableDataService<Qu
|
||||
return this.searchData.searchBy('findByTopic', options, true, true, ...linksToFollow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Service for retrieving Quality Assurance events by topic and target.
|
||||
* @param options (Optional) The search options to use when retrieving the events.
|
||||
* @param linksToFollow (Optional) The links to follow when retrieving the events.
|
||||
* @returns An observable of the remote data containing the paginated list of Quality Assurance events.
|
||||
*/
|
||||
public searchEventsByTopic(options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig<QualityAssuranceEventObject>[]): Observable<RemoteData<PaginatedList<QualityAssuranceEventObject>>> {
|
||||
return this.searchData.searchBy('findByTopic', options, true, true, ...linksToFollow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear findByTopic requests from cache
|
||||
*/
|
||||
|
@@ -16,6 +16,7 @@ import { PaginatedList } from '../../../data/paginated-list.model';
|
||||
import { FindListOptions } from '../../../data/find-list-options.model';
|
||||
import { IdentifiableDataService } from '../../../data/base/identifiable-data.service';
|
||||
import { FindAllData, FindAllDataImpl } from '../../../data/base/find-all-data';
|
||||
import { SearchData, SearchDataImpl } from 'src/app/core/data/base/search-data';
|
||||
|
||||
/**
|
||||
* The service handling all Quality Assurance source REST requests.
|
||||
@@ -25,6 +26,9 @@ import { FindAllData, FindAllDataImpl } from '../../../data/base/find-all-data';
|
||||
export class QualityAssuranceSourceDataService extends IdentifiableDataService<QualityAssuranceSourceObject> {
|
||||
|
||||
private findAllData: FindAllData<QualityAssuranceSourceObject>;
|
||||
private searchAllData: SearchData<QualityAssuranceSourceObject>;
|
||||
|
||||
private searchByTargetMethod = 'byTarget';
|
||||
|
||||
/**
|
||||
* Initialize service variables
|
||||
@@ -43,6 +47,7 @@ export class QualityAssuranceSourceDataService extends IdentifiableDataService<Q
|
||||
) {
|
||||
super('qualityassurancesources', requestService, rdbService, objectCache, halService);
|
||||
this.findAllData = new FindAllDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive);
|
||||
this.searchAllData = new SearchDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,4 +89,16 @@ export class QualityAssuranceSourceDataService extends IdentifiableDataService<Q
|
||||
public getSource(id: string, useCachedVersionIfAvailable = true, reRequestOnStale = true, ...linksToFollow: FollowLinkConfig<QualityAssuranceSourceObject>[]): Observable<RemoteData<QualityAssuranceSourceObject>> {
|
||||
return this.findById(id, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a paginated list of QualityAssuranceSourceObject objects that are associated with a given target object.
|
||||
* @param options The options for the search query.
|
||||
* @param useCachedVersionIfAvailable Whether to use a cached version of the data if available.
|
||||
* @param reRequestOnStale Whether to re-request the data if the cached version is stale.
|
||||
* @param linksToFollow The links to follow to retrieve the data.
|
||||
* @returns An observable that emits a RemoteData object containing the paginated list of QualityAssuranceSourceObject objects.
|
||||
*/
|
||||
public getSourcesByTarget(options: FindListOptions = {}, useCachedVersionIfAvailable = true, reRequestOnStale = true, ...linksToFollow: FollowLinkConfig<QualityAssuranceSourceObject>[]): Observable<RemoteData<PaginatedList<QualityAssuranceSourceObject>>> {
|
||||
return this.searchAllData.searchBy(this.searchByTargetMethod, options, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ import { IdentifiableDataService } from '../../../data/base/identifiable-data.se
|
||||
import { dataService } from '../../../data/base/data-service.decorator';
|
||||
import { QUALITY_ASSURANCE_TOPIC_OBJECT } from '../models/quality-assurance-topic-object.resource-type';
|
||||
import { FindAllData, FindAllDataImpl } from '../../../data/base/find-all-data';
|
||||
import { SearchData, SearchDataImpl } from '../../../../core/data/base/search-data';
|
||||
|
||||
/**
|
||||
* The service handling all Quality Assurance topic REST requests.
|
||||
@@ -25,6 +26,9 @@ import { FindAllData, FindAllDataImpl } from '../../../data/base/find-all-data';
|
||||
export class QualityAssuranceTopicDataService extends IdentifiableDataService<QualityAssuranceTopicObject> {
|
||||
|
||||
private findAllData: FindAllData<QualityAssuranceTopicObject>;
|
||||
private searchData: SearchData<QualityAssuranceTopicObject>;
|
||||
|
||||
private searchByTargetMethod = 'byTarget';
|
||||
|
||||
/**
|
||||
* Initialize service variables
|
||||
@@ -43,6 +47,7 @@ export class QualityAssuranceTopicDataService extends IdentifiableDataService<Qu
|
||||
) {
|
||||
super('qualityassurancetopics', requestService, rdbService, objectCache, halService);
|
||||
this.findAllData = new FindAllDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive);
|
||||
this.searchData = new SearchDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,6 +67,18 @@ export class QualityAssuranceTopicDataService extends IdentifiableDataService<Qu
|
||||
return this.findAllData.findAll(options, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for Quality Assurance topics.
|
||||
* @param options The search options.
|
||||
* @param useCachedVersionIfAvailable Whether to use cached version if available.
|
||||
* @param reRequestOnStale Whether to re-request on stale.
|
||||
* @param linksToFollow The links to follow.
|
||||
* @returns An observable of remote data containing a paginated list of Quality Assurance topics.
|
||||
*/
|
||||
public searchTopics(options: FindListOptions = {}, useCachedVersionIfAvailable = true, reRequestOnStale = true, ...linksToFollow: FollowLinkConfig<QualityAssuranceTopicObject>[]): Observable<RemoteData<PaginatedList<QualityAssuranceTopicObject>>> {
|
||||
return this.searchData.searchBy(this.searchByTargetMethod, options, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear FindAll topics requests from cache
|
||||
*/
|
||||
|
@@ -60,6 +60,7 @@ import { ThemedItemAlertsComponent } from './alerts/themed-item-alerts.component
|
||||
import {
|
||||
ThemedFullFileSectionComponent
|
||||
} from './full/field-components/file-section/themed-full-file-section.component';
|
||||
import { QaEventNotificationComponent } from './simple/qa-event-notification/qa-event-notification.component';
|
||||
|
||||
const ENTRY_COMPONENTS = [
|
||||
// put only entry components that use custom decorator
|
||||
@@ -103,6 +104,7 @@ const DECLARATIONS = [
|
||||
ItemAlertsComponent,
|
||||
ThemedItemAlertsComponent,
|
||||
BitstreamRequestACopyPageComponent,
|
||||
QaEventNotificationComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<div class="item-page" *ngIf="itemRD?.hasSucceeded" @fadeInOut>
|
||||
<div *ngIf="itemRD?.payload as item">
|
||||
<ds-themed-item-alerts [item]="item"></ds-themed-item-alerts>
|
||||
<ds-qa-event-notification [item]="item"></ds-qa-event-notification>
|
||||
<ds-item-versions-notice [item]="item"></ds-item-versions-notice>
|
||||
<ds-view-tracker [object]="item"></ds-view-tracker>
|
||||
<ds-listable-object-component-loader *ngIf="!item.isWithdrawn || (isAdmin$|async)" [object]="item" [viewMode]="viewMode"></ds-listable-object-component-loader>
|
||||
|
@@ -33,7 +33,7 @@ import { NotifyInfoService } from 'src/app/core/coar-notify/notify-info/notify-i
|
||||
styleUrls: ['./item-page.component.scss'],
|
||||
templateUrl: './item-page.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
animations: [fadeInOut]
|
||||
animations: [fadeInOut],
|
||||
})
|
||||
export class ItemPageComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
@@ -0,0 +1,14 @@
|
||||
<ng-container *ngIf="(getQualityAssuranceSources$() | async)?.length > 0">
|
||||
<ng-container *ngFor="let source of (getQualityAssuranceSources$() | async)">
|
||||
<div class="alert alert-info d-flex flex-row" *ngIf="source.totalEvents > 0">
|
||||
<img class="source-logo" src="assets/images/qa-{{(source.id | dsSplit: ':')[0]}}-logo.png" alt="{{source.id}} logo">
|
||||
<div class="w-100 d-flex justify-content-between">
|
||||
<div class="pl-4 align-self-center">{{'item.qa-event-notification.check.notification-info' | translate : {num:
|
||||
source.totalEvents } }} </div>
|
||||
<button [routerLink]="['/admin/notifications/quality-assurance', source, item.id]"
|
||||
class="btn btn-primary align-self-center">{{'item.qa-event-notification-info.check.button' | translate
|
||||
}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
@@ -0,0 +1,8 @@
|
||||
|
||||
.source-logo {
|
||||
max-height: var(--ds-header-logo-height);
|
||||
}
|
||||
|
||||
.sections-gap {
|
||||
gap: 1rem;
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { QaEventNotificationComponent } from './qa-event-notification.component';
|
||||
|
||||
describe('QaEventNotificationComponent', () => {
|
||||
let component: QaEventNotificationComponent;
|
||||
let fixture: ComponentFixture<QaEventNotificationComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ QaEventNotificationComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(QaEventNotificationComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@@ -0,0 +1,53 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
import { Item } from '../../../core/shared/item.model';
|
||||
import { getFirstCompletedRemoteData, getPaginatedListPayload, getRemoteDataPayload } from '../../../core/shared/operators';
|
||||
import { Observable, tap } from 'rxjs';
|
||||
import { AlertType } from '../../../shared/alert/aletr-type';
|
||||
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
||||
import { RequestParam } from '../../../core/cache/models/request-param.model';
|
||||
import { QualityAssuranceSourceDataService } from '../../../core/suggestion-notifications/qa/source/quality-assurance-source-data.service';
|
||||
import { QualityAssuranceSourceObject } from '../../../core/suggestion-notifications/qa/models/quality-assurance-source.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-qa-event-notification',
|
||||
templateUrl: './qa-event-notification.component.html',
|
||||
styleUrls: ['./qa-event-notification.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
providers: [QualityAssuranceSourceDataService]
|
||||
})
|
||||
/**
|
||||
* Component for displaying quality assurance event notifications for an item.
|
||||
*/
|
||||
export class QaEventNotificationComponent {
|
||||
|
||||
/**
|
||||
* The item to display quality assurance event notifications for.
|
||||
*/
|
||||
@Input() item: Item;
|
||||
|
||||
/**
|
||||
* The type of alert to display for the notification.
|
||||
*/
|
||||
AlertTypeInfo = AlertType.Info;
|
||||
|
||||
constructor(
|
||||
private qualityAssuranceSourceDataService: QualityAssuranceSourceDataService,
|
||||
) { }
|
||||
|
||||
/**
|
||||
* Returns an Observable of QualityAssuranceSourceObject[] for the current item.
|
||||
* @returns An Observable of QualityAssuranceSourceObject[] for the current item.
|
||||
* Note: sourceId is composed as: id: "sourceName:<target>"
|
||||
*/
|
||||
getQualityAssuranceSources$(): Observable<QualityAssuranceSourceObject[]> {
|
||||
const findListTopicOptions: FindListOptions = {
|
||||
searchParams: [new RequestParam('target', this.item.uuid)]
|
||||
};
|
||||
return this.qualityAssuranceSourceDataService.getSourcesByTarget(findListTopicOptions)
|
||||
.pipe(
|
||||
getFirstCompletedRemoteData(),
|
||||
getRemoteDataPayload(),
|
||||
getPaginatedListPayload(),
|
||||
);
|
||||
}
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
<div class="container">
|
||||
<ds-my-dspace-qa-events-notifications></ds-my-dspace-qa-events-notifications>
|
||||
<ds-my-dspace-new-submission *dsShowOnlyForRole="[roleTypeEnum.Submitter]"></ds-my-dspace-new-submission>
|
||||
<ds-suggestions-notification></ds-suggestions-notification>
|
||||
</div>
|
||||
|
@@ -16,6 +16,7 @@ import { ThemedMyDSpacePageComponent } from './themed-my-dspace-page.component';
|
||||
import { SearchModule } from '../shared/search/search.module';
|
||||
import { UploadModule } from '../shared/upload/upload.module';
|
||||
import { SuggestionNotificationsModule } from '../suggestion-notifications/suggestion-notifications.module';
|
||||
import { MyDspaceQaEventsNotificationsComponent } from './my-dspace-qa-events-notifications/my-dspace-qa-events-notifications.component';
|
||||
|
||||
const DECLARATIONS = [
|
||||
MyDSpacePageComponent,
|
||||
@@ -23,7 +24,8 @@ const DECLARATIONS = [
|
||||
MyDSpaceNewSubmissionComponent,
|
||||
CollectionSelectorComponent,
|
||||
MyDSpaceNewSubmissionDropdownComponent,
|
||||
MyDSpaceNewExternalDropdownComponent
|
||||
MyDSpaceNewExternalDropdownComponent,
|
||||
MyDspaceQaEventsNotificationsComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@@ -0,0 +1,28 @@
|
||||
<ng-container *ngIf="(sources$ | async)?.length > 0">
|
||||
<ng-container *ngFor="let source of sources$ | async">
|
||||
<div
|
||||
class="alert alert-info d-flex flex-row"
|
||||
*ngIf="source.totalEvents > 0"
|
||||
>
|
||||
<img
|
||||
class="source-logo"
|
||||
src="assets/images/qa-{{ source.id }}-logo.png"
|
||||
alt="{{ source.id }} logo"
|
||||
/>
|
||||
<div class="w-100 d-flex justify-content-between">
|
||||
<div class="pl-4 align-self-center">
|
||||
{{
|
||||
"mydspace.qa-event-notification.check.notification-info"
|
||||
| translate : { num: source.totalEvents }
|
||||
}}
|
||||
</div>
|
||||
<button
|
||||
[routerLink]="['/admin/notifications/quality-assurance', source.id]"
|
||||
class="btn btn-primary align-self-center"
|
||||
>
|
||||
{{ "mydspace.qa-event-notification-info.check.button" | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
@@ -0,0 +1,8 @@
|
||||
|
||||
.source-logo {
|
||||
max-height: var(--ds-header-logo-height);
|
||||
}
|
||||
|
||||
.sections-gap {
|
||||
gap: 1rem;
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MyDspaceQaEventsNotificationsComponent } from './my-dspace-qa-events-notifications.component';
|
||||
|
||||
describe('MyDspaceQaEventsNotificationsComponent', () => {
|
||||
let component: MyDspaceQaEventsNotificationsComponent;
|
||||
let fixture: ComponentFixture<MyDspaceQaEventsNotificationsComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ MyDspaceQaEventsNotificationsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(MyDspaceQaEventsNotificationsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@@ -0,0 +1,44 @@
|
||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { QualityAssuranceSourceDataService } from '../../core/suggestion-notifications/qa/source/quality-assurance-source-data.service';
|
||||
import { getFirstCompletedRemoteData, getPaginatedListPayload, getRemoteDataPayload } from '../../core/shared/operators';
|
||||
import { Observable, of, tap } from 'rxjs';
|
||||
import { QualityAssuranceSourceObject } from 'src/app/core/suggestion-notifications/qa/models/quality-assurance-source.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-my-dspace-qa-events-notifications',
|
||||
templateUrl: './my-dspace-qa-events-notifications.component.html',
|
||||
styleUrls: ['./my-dspace-qa-events-notifications.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class MyDspaceQaEventsNotificationsComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* An Observable that emits an array of QualityAssuranceSourceObject.
|
||||
*/
|
||||
sources$: Observable<QualityAssuranceSourceObject[]> = of([]);
|
||||
|
||||
constructor(private qualityAssuranceSourceDataService: QualityAssuranceSourceDataService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.getSources();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the sources for Quality Assurance.
|
||||
* @returns An Observable of the sources for Quality Assurance.
|
||||
* @throws An error if the retrieval of Quality Assurance sources fails.
|
||||
*/
|
||||
getSources() {
|
||||
this.sources$ = this.qualityAssuranceSourceDataService.getSources()
|
||||
.pipe(
|
||||
getFirstCompletedRemoteData(),
|
||||
tap((rd) => {
|
||||
if (rd.hasFailed) {
|
||||
throw new Error('Can\'t retrieve Quality Assurance sources');
|
||||
}
|
||||
}),
|
||||
getRemoteDataPayload(),
|
||||
getPaginatedListPayload(),
|
||||
);
|
||||
}
|
||||
}
|
@@ -284,6 +284,7 @@ import {
|
||||
} from '../item-page/simple/field-components/specific-field/title/themed-item-page-field.component';
|
||||
import { BitstreamListItemComponent } from './object-list/bitstream-list-item/bitstream-list-item.component';
|
||||
import { NgxPaginationModule } from 'ngx-pagination';
|
||||
import { SplitPipe } from './utils/split.pipe';
|
||||
|
||||
const MODULES = [
|
||||
CommonModule,
|
||||
@@ -323,7 +324,8 @@ const PIPES = [
|
||||
ObjNgFor,
|
||||
BrowserOnlyPipe,
|
||||
MarkdownPipe,
|
||||
ShortNumberPipe
|
||||
ShortNumberPipe,
|
||||
SplitPipe,
|
||||
];
|
||||
|
||||
const COMPONENTS = [
|
||||
|
12
src/app/shared/utils/split.pipe.ts
Normal file
12
src/app/shared/utils/split.pipe.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'dsSplit'
|
||||
})
|
||||
export class SplitPipe implements PipeTransform {
|
||||
|
||||
transform(value: string, separator: string): string[] {
|
||||
return value.split(separator);
|
||||
}
|
||||
|
||||
}
|
@@ -60,6 +60,12 @@ export class QualityAssuranceTopicsComponent implements OnInit {
|
||||
*/
|
||||
public sourceId: string;
|
||||
|
||||
/**
|
||||
* This property represents a targetId (item-id) which is used to retrive a topic
|
||||
* @type {string}
|
||||
*/
|
||||
public targetId: string;
|
||||
|
||||
/**
|
||||
* Initialize the component variables.
|
||||
* @param {PaginationService} paginationService
|
||||
@@ -80,7 +86,9 @@ export class QualityAssuranceTopicsComponent implements OnInit {
|
||||
*/
|
||||
ngOnInit(): void {
|
||||
this.sourceId = this.activatedRoute.snapshot.paramMap.get('sourceId');
|
||||
this.targetId = this.activatedRoute.snapshot.paramMap.get('targetId');
|
||||
this.qualityAssuranceTopicsService.setSourceId(this.sourceId);
|
||||
this.qualityAssuranceTopicsService.setTargetId(this.targetId);
|
||||
this.topics$ = this.notificationsStateService.getQualityAssuranceTopics();
|
||||
this.totalElements$ = this.notificationsStateService.getQualityAssuranceTopicsTotals();
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ import {
|
||||
import { RequestParam } from '../../../core/cache/models/request-param.model';
|
||||
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
|
||||
/**
|
||||
* The service handling all Quality Assurance topic requests to the REST service.
|
||||
@@ -33,6 +34,11 @@ export class QualityAssuranceTopicsService {
|
||||
*/
|
||||
sourceId: string;
|
||||
|
||||
/**
|
||||
* targetId used to get topics
|
||||
*/
|
||||
targetId: string;
|
||||
|
||||
/**
|
||||
* Return the list of Quality Assurance topics managing pagination and errors.
|
||||
*
|
||||
@@ -53,6 +59,10 @@ export class QualityAssuranceTopicsService {
|
||||
searchParams: [new RequestParam('source', this.sourceId)]
|
||||
};
|
||||
|
||||
if (hasValue(this.targetId)) {
|
||||
findListOptions.searchParams.push(new RequestParam('target', this.targetId));
|
||||
}
|
||||
|
||||
return this.qualityAssuranceTopicRestService.getTopics(findListOptions).pipe(
|
||||
getFirstCompletedRemoteData(),
|
||||
map((rd: RemoteData<PaginatedList<QualityAssuranceTopicObject>>) => {
|
||||
@@ -72,4 +82,12 @@ export class QualityAssuranceTopicsService {
|
||||
setSourceId(sourceId: string) {
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* set targetId which is used to get topics
|
||||
* @param targetId string
|
||||
*/
|
||||
setTargetId(targetId: string) {
|
||||
this.targetId = targetId;
|
||||
}
|
||||
}
|
||||
|
@@ -2480,6 +2480,14 @@
|
||||
|
||||
"item.truncatable-part.show-less": "Collapse",
|
||||
|
||||
"item.qa-event-notification.check.notification-info": "There are {{num}} pending review to check",
|
||||
|
||||
"item.qa-event-notification-info.check.button": "Check",
|
||||
|
||||
"mydspace.qa-event-notification.check.notification-info": "There are {{num}} pending review to check",
|
||||
|
||||
"mydspace.qa-event-notification-info.check.button": "Check",
|
||||
|
||||
"workflow-item.search.result.delete-supervision.modal.header": "Delete Supervision Order",
|
||||
|
||||
"workflow-item.search.result.delete-supervision.modal.info": "Are you sure you want to delete Supervision Order",
|
||||
|
@@ -3723,6 +3723,22 @@
|
||||
// "item.truncatable-part.show-less": "Collapse",
|
||||
"item.truncatable-part.show-less": "Riduci",
|
||||
|
||||
// "item.qa-event-notification.check.notification-info": "There are {{num}} pending review to check",
|
||||
// TODO New key - Add a translation
|
||||
"item.qa-event-notification.check.notification-info": "There are {{num}} pending review to check",
|
||||
|
||||
// "item.qa-event-notification-info.check.button": "Check",
|
||||
// TODO New key - Add a translation
|
||||
"item.qa-event-notification-info.check.button": "Check",
|
||||
|
||||
// "mydspace.qa-event-notification.check.notification-info": "There are {{num}} pending review to check",
|
||||
// TODO New key - Add a translation
|
||||
"mydspace.qa-event-notification.check.notification-info": "There are {{num}} pending review to check",
|
||||
|
||||
// "mydspace.qa-event-notification-info.check.button": "Check",
|
||||
// TODO New key - Add a translation
|
||||
"mydspace.qa-event-notification-info.check.button": "Check",
|
||||
|
||||
// "workflow-item.search.result.delete-supervision.modal.header": "Delete Supervision Order",
|
||||
// TODO New key - Add a translation
|
||||
"workflow-item.search.result.delete-supervision.modal.header": "Delete Supervision Order",
|
||||
|
BIN
src/assets/images/qa-coar-notify-logo.png
Normal file
BIN
src/assets/images/qa-coar-notify-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/images/qa-openaire-logo.png
Normal file
BIN
src/assets/images/qa-openaire-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user