mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
Fixed issue with resource policies list that was not updated after a delete
This commit is contained in:
@@ -112,6 +112,7 @@ export class ResourcePoliciesComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
ngOnInit(): void {
|
||||
this.isActive = true;
|
||||
this.requestService.removeByHrefSubstring(this.resourceUUID);
|
||||
this.initResourcePolicyLIst();
|
||||
}
|
||||
|
||||
@@ -134,6 +135,7 @@ export class ResourcePoliciesComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
deleteSelectedResourcePolicies(): void {
|
||||
this.processingDelete$.next(true);
|
||||
this.requestService.removeByHrefSubstring(this.resourceUUID);
|
||||
const policiesToDelete: ResourcePolicyCheckboxEntry[] = this.resourcePoliciesEntries$.value
|
||||
.filter((entry: ResourcePolicyCheckboxEntry) => entry.checked);
|
||||
this.subs.push(
|
||||
@@ -244,8 +246,6 @@ export class ResourcePoliciesComponent implements OnInit, OnDestroy {
|
||||
* Initialize the resource's policies list
|
||||
*/
|
||||
initResourcePolicyLIst() {
|
||||
// TODO to be reviewed when https://github.com/DSpace/dspace-angular/issues/644 will be resolved
|
||||
this.requestService.removeByHrefSubstring(this.resourceUUID);
|
||||
this.resourcePolicyService.searchByResource(this.resourceUUID, null,
|
||||
followLink('eperson'), followLink('group')).pipe(
|
||||
filter(() => this.isActive),
|
||||
|
Reference in New Issue
Block a user