From 8e0af9bceed05c9795d03966cd87b3462b21ebd4 Mon Sep 17 00:00:00 2001 From: Alisa Ismailati Date: Mon, 30 Oct 2023 10:57:04 +0100 Subject: [PATCH] [CST-12145] commented code --- .../topics/quality-assurance-topic-data.service.ts | 12 ++++++++++++ .../qa-event-notification.component.ts | 6 +----- .../my-dspace-qa-events-notifications.component.ts | 8 ++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/app/core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service.ts b/src/app/core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service.ts index 626674a5ad9..bb98e6fabfd 100644 --- a/src/app/core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service.ts +++ b/src/app/core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service.ts @@ -67,6 +67,18 @@ export class QualityAssuranceTopicDataService extends IdentifiableDataService[]): Observable>> { + return this.searchData.searchBy(this.searchByTargetMethod, options, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow); + } + /** * Clear FindAll topics requests from cache */ diff --git a/src/app/item-page/simple/qa-event-notification/qa-event-notification.component.ts b/src/app/item-page/simple/qa-event-notification/qa-event-notification.component.ts index 455629c026f..0a26045e396 100644 --- a/src/app/item-page/simple/qa-event-notification/qa-event-notification.component.ts +++ b/src/app/item-page/simple/qa-event-notification/qa-event-notification.component.ts @@ -63,11 +63,7 @@ export class QaEventNotificationComponent implements OnInit { searchParams: [new RequestParam('source', this.source), new RequestParam('target', this.item.id)] }; - // const findListEventOptions: FindListOptions = { - // searchParams: [new RequestParam('topic', topic.name), new RequestParam('target', this.item.id)] - // }; - - this.events$ = this.qualityAssuranceTopicDataService.getTopics(findListTopicOptions).pipe( + this.events$ = this.qualityAssuranceTopicDataService.searchTopics(findListTopicOptions).pipe( getFirstCompletedRemoteData(), getRemoteDataPayload(), getPaginatedListPayload(), diff --git a/src/app/my-dspace-page/my-dspace-qa-events-notifications/my-dspace-qa-events-notifications.component.ts b/src/app/my-dspace-page/my-dspace-qa-events-notifications/my-dspace-qa-events-notifications.component.ts index 8b7127dd895..9992ec9ff83 100644 --- a/src/app/my-dspace-page/my-dspace-qa-events-notifications/my-dspace-qa-events-notifications.component.ts +++ b/src/app/my-dspace-page/my-dspace-qa-events-notifications/my-dspace-qa-events-notifications.component.ts @@ -12,6 +12,9 @@ import { QualityAssuranceSourceObject } from 'src/app/core/suggestion-notificati }) export class MyDspaceQaEventsNotificationsComponent implements OnInit { + /** + * An Observable that emits an array of QualityAssuranceSourceObject. + */ sources$: Observable = of([]); constructor(private qualityAssuranceSourceDataService: QualityAssuranceSourceDataService) { } @@ -20,6 +23,11 @@ export class MyDspaceQaEventsNotificationsComponent implements OnInit { 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(