mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +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 {
|
ngOnInit(): void {
|
||||||
this.isActive = true;
|
this.isActive = true;
|
||||||
|
this.requestService.removeByHrefSubstring(this.resourceUUID);
|
||||||
this.initResourcePolicyLIst();
|
this.initResourcePolicyLIst();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,6 +135,7 @@ export class ResourcePoliciesComponent implements OnInit, OnDestroy {
|
|||||||
*/
|
*/
|
||||||
deleteSelectedResourcePolicies(): void {
|
deleteSelectedResourcePolicies(): void {
|
||||||
this.processingDelete$.next(true);
|
this.processingDelete$.next(true);
|
||||||
|
this.requestService.removeByHrefSubstring(this.resourceUUID);
|
||||||
const policiesToDelete: ResourcePolicyCheckboxEntry[] = this.resourcePoliciesEntries$.value
|
const policiesToDelete: ResourcePolicyCheckboxEntry[] = this.resourcePoliciesEntries$.value
|
||||||
.filter((entry: ResourcePolicyCheckboxEntry) => entry.checked);
|
.filter((entry: ResourcePolicyCheckboxEntry) => entry.checked);
|
||||||
this.subs.push(
|
this.subs.push(
|
||||||
@@ -244,8 +246,6 @@ export class ResourcePoliciesComponent implements OnInit, OnDestroy {
|
|||||||
* Initialize the resource's policies list
|
* Initialize the resource's policies list
|
||||||
*/
|
*/
|
||||||
initResourcePolicyLIst() {
|
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,
|
this.resourcePolicyService.searchByResource(this.resourceUUID, null,
|
||||||
followLink('eperson'), followLink('group')).pipe(
|
followLink('eperson'), followLink('group')).pipe(
|
||||||
filter(() => this.isActive),
|
filter(() => this.isActive),
|
||||||
|
Reference in New Issue
Block a user