mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 22:13:02 +00:00
[CST-5249] fix suggestion refresh after ignore
This commit is contained in:
@@ -155,7 +155,7 @@ describe('SuggestionDataService test', () => {
|
|||||||
searchParams: [new RequestParam('target', testUserId), new RequestParam('source', testSource)]
|
searchParams: [new RequestParam('target', testUserId), new RequestParam('source', testSource)]
|
||||||
};
|
};
|
||||||
service.getSuggestionsByTargetAndSource(testUserId, testSource);
|
service.getSuggestionsByTargetAndSource(testUserId, testSource);
|
||||||
expect(suggestionsDataService.searchBy).toHaveBeenCalledWith('findByTargetAndSource', options, true, true);
|
expect(suggestionsDataService.searchBy).toHaveBeenCalledWith('findByTargetAndSource', options, false, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call suggestionsDataService.delete', () => {
|
it('should call suggestionsDataService.delete', () => {
|
||||||
|
@@ -217,7 +217,7 @@ export class SuggestionsDataService {
|
|||||||
new RequestParam('source', source)
|
new RequestParam('source', source)
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.suggestionsDataService.searchBy(this.searchFindByTargetAndSourceMethod, options, true, true, ...linksToFollow);
|
return this.suggestionsDataService.searchBy(this.searchFindByTargetAndSourceMethod, options, false, true, ...linksToFollow);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { ActivatedRoute, Data, Router } from '@angular/router';
|
import { ActivatedRoute, Data, Router } from '@angular/router';
|
||||||
|
|
||||||
import { BehaviorSubject, combineLatest, Observable } from 'rxjs';
|
import { BehaviorSubject, combineLatest, Observable } from 'rxjs';
|
||||||
import { distinctUntilChanged, map, switchMap, take } from 'rxjs/operators';
|
import { delay, distinctUntilChanged, map, switchMap, take } from 'rxjs/operators';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { SortDirection, SortOptions, } from '../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions, } from '../core/cache/models/sort-options.model';
|
||||||
@@ -155,7 +155,9 @@ export class SuggestionsPageComponent implements OnInit {
|
|||||||
* @suggestionId
|
* @suggestionId
|
||||||
*/
|
*/
|
||||||
ignoreSuggestion(suggestionId) {
|
ignoreSuggestion(suggestionId) {
|
||||||
this.suggestionService.ignoreSuggestion(suggestionId).subscribe(() => {
|
this.suggestionService.ignoreSuggestion(suggestionId).pipe(
|
||||||
|
delay(100)
|
||||||
|
).subscribe(() => {
|
||||||
this.suggestionTargetsStateService.dispatchRefreshUserSuggestionsAction();
|
this.suggestionTargetsStateService.dispatchRefreshUserSuggestionsAction();
|
||||||
this.updatePage();
|
this.updatePage();
|
||||||
});
|
});
|
||||||
|
@@ -3120,7 +3120,7 @@
|
|||||||
|
|
||||||
"mydspace.import": "Import",
|
"mydspace.import": "Import",
|
||||||
|
|
||||||
"notification.suggestion": "We found <b>{{count}} publications</b><br> in the {{source}} that seems to be related to your profile.<br> Please <a href='{{ url }}'>review the suggestions</a>",
|
"notification.suggestion": "We found <b>{{count}} publications</b> in the {{source}} that seems to be related to your profile.<br> Please <a href='{{ url }}'>review the suggestions</a>",
|
||||||
|
|
||||||
"nav.browse.header": "All of DSpace",
|
"nav.browse.header": "All of DSpace",
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user