mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fixes after rebase reinstated
This commit is contained in:
@@ -62,7 +62,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
|
||||
ngOnInit() {
|
||||
this.subs.push(this.groupDataService.getActiveGroup().subscribe((group: Group) => {
|
||||
if (group != null) {
|
||||
this.groups = this.groupDataService.findAllByHref(group._links.groups.href, {
|
||||
this.groups = this.groupDataService.findAllByHref(group._links.subgroups.href, {
|
||||
currentPage: 1,
|
||||
elementsPerPage: this.config.pageSize
|
||||
})
|
||||
@@ -100,7 +100,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
|
||||
return this.groupDataService.getActiveGroup().pipe(take(1),
|
||||
mergeMap((group: Group) => {
|
||||
if (group != null) {
|
||||
return this.groupDataService.findAllByHref(group._links.groups.href, {
|
||||
return this.groupDataService.findAllByHref(group._links.subgroups.href, {
|
||||
currentPage: 0,
|
||||
elementsPerPage: Number.MAX_SAFE_INTEGER
|
||||
})
|
||||
@@ -157,7 +157,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
|
||||
this.groups = this.groupDataService.searchGroups(query.trim(), {
|
||||
currentPage: 1,
|
||||
elementsPerPage: this.config.pageSize
|
||||
}, followLink('epersons'));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,7 +166,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
public forceUpdateGroups(activeGroup: Group) {
|
||||
this.groupDataService.clearGroupsRequests();
|
||||
this.groups = this.groupDataService.findAllByHref(activeGroup._links.groups.href, {
|
||||
this.groups = this.groupDataService.findAllByHref(activeGroup._links.subgroups.href, {
|
||||
currentPage: 1,
|
||||
elementsPerPage: this.config.pageSize
|
||||
})
|
||||
|
@@ -75,7 +75,7 @@ export class GroupsRegistryComponent implements OnInit {
|
||||
* Update the list of groups by fetching it from the rest api or cache
|
||||
*/
|
||||
private updateGroups(options) {
|
||||
this.groups = this.groupService.getGroups(options, followLink('epersons'), followLink('groups'));
|
||||
this.groups = this.groupService.getGroups(options, followLink('epersons'), followLink('subgroups'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +87,7 @@ export class GroupsRegistryComponent implements OnInit {
|
||||
this.groups = this.groupService.searchGroups(query.trim(), {
|
||||
currentPage: 1,
|
||||
elementsPerPage: this.config.pageSize
|
||||
}, followLink('epersons'));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,7 +130,7 @@ export class GroupsRegistryComponent implements OnInit {
|
||||
* @param group
|
||||
*/
|
||||
getSubgroups(group: Group): Observable<RemoteData<PaginatedList<Group>>> {
|
||||
return this.groupService.findAllByHref(group._links.groups.href);
|
||||
return this.groupService.findAllByHref(group._links.subgroups.href);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -124,7 +124,7 @@ export class GroupDataService extends DataService<Group> {
|
||||
* @param id The group id to delete
|
||||
*/
|
||||
public deleteGroup(group: Group): Observable<boolean> {
|
||||
return this.delete(group);
|
||||
return this.delete(group.id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -39,7 +39,7 @@ export class Group extends DSpaceObject {
|
||||
@deserialize
|
||||
_links: {
|
||||
self: HALLink;
|
||||
groups: HALLink;
|
||||
subgroups: HALLink;
|
||||
epersons: HALLink;
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ export class Group extends DSpaceObject {
|
||||
* Will be undefined unless the groups {@link HALLink} has been resolved.
|
||||
*/
|
||||
@link(GROUP, true)
|
||||
public groups?: Observable<RemoteData<PaginatedList<Group>>>;
|
||||
public subgroups?: Observable<RemoteData<PaginatedList<Group>>>;
|
||||
|
||||
/**
|
||||
* The list of EPeople in this group
|
||||
|
@@ -2,7 +2,6 @@ import { ChangeDetectorRef, Component, Inject } from '@angular/core';
|
||||
|
||||
import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, Subscription} from 'rxjs';
|
||||
import { distinctUntilChanged, filter, find, flatMap, map, reduce, take, tap } from 'rxjs/operators';
|
||||
import { followLink } from '../../../shared/utils/follow-link-config.model';
|
||||
|
||||
import { SectionModelComponent } from '../models/section.model';
|
||||
import { hasValue, isNotEmpty, isNotUndefined, isUndefined } from '../../../shared/empty.util';
|
||||
@@ -23,7 +22,6 @@ import { Group } from '../../../core/eperson/models/group.model';
|
||||
import { SectionsService } from '../sections.service';
|
||||
import { SubmissionService } from '../../submission.service';
|
||||
import { Collection } from '../../../core/shared/collection.model';
|
||||
import { ResourcePolicy } from '../../../core/shared/resource-policy.model';
|
||||
import { AccessConditionOption } from '../../../core/config/models/config-access-condition-option.model';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||
|
||||
@@ -205,7 +203,7 @@ export class SubmissionSectionUploadComponent extends SectionModelComponent {
|
||||
mapGroups$.push(
|
||||
this.groupService.findById(accessCondition.selectGroupUUID).pipe(
|
||||
find((rd: RemoteData<Group>) => !rd.isResponsePending && rd.hasSucceeded),
|
||||
flatMap((group: RemoteData<Group>) => group.payload.groups),
|
||||
flatMap((group: RemoteData<Group>) => group.payload.subgroups),
|
||||
find((rd: RemoteData<PaginatedList<Group>>) => !rd.isResponsePending && rd.hasSucceeded),
|
||||
map((rd: RemoteData<PaginatedList<Group>>) => ({
|
||||
accessCondition: accessCondition.name,
|
||||
|
Reference in New Issue
Block a user