mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 13:03:04 +00:00
reordering authors
This commit is contained in:
@@ -197,21 +197,23 @@ export class SubmissionFormCollectionComponent implements OnChanges, OnInit {
|
||||
find((communities: RemoteData<PaginatedList<Community>>) => isNotEmpty(communities.payload)),
|
||||
mergeMap((communities: RemoteData<PaginatedList<Community>>) => communities.payload.page));
|
||||
|
||||
const listCollection$ = communities$.pipe(
|
||||
flatMap((communityData: Community) => {
|
||||
return this.collectionDataService.getAuthorizedCollectionByCommunity(communityData.uuid, findOptions).pipe(
|
||||
find((collections: RemoteData<PaginatedList<Collection>>) => !collections.isResponsePending && collections.hasSucceeded),
|
||||
mergeMap((collections: RemoteData<PaginatedList<Collection>>) => collections.payload.page),
|
||||
filter((collectionData: Collection) => isNotEmpty(collectionData)),
|
||||
map((collectionData: Collection) => ({
|
||||
communities: [{ id: communityData.id, name: communityData.name }],
|
||||
collection: { id: collectionData.id, name: collectionData.name }
|
||||
}))
|
||||
);
|
||||
}),
|
||||
reduce((acc: any, value: any) => [...acc, ...value], []),
|
||||
startWith([])
|
||||
);
|
||||
const listCollection$ = observableOf([]);
|
||||
|
||||
// const listCollection$ = communities$.pipe(
|
||||
// flatMap((communityData: Community) => {
|
||||
// return this.collectionDataService.getAuthorizedCollectionByCommunity(communityData.uuid, findOptions).pipe(
|
||||
// find((collections: RemoteData<PaginatedList<Collection>>) => !collections.isResponsePending && collections.hasSucceeded),
|
||||
// mergeMap((collections: RemoteData<PaginatedList<Collection>>) => collections.payload.page),
|
||||
// filter((collectionData: Collection) => isNotEmpty(collectionData)),
|
||||
// map((collectionData: Collection) => ({
|
||||
// communities: [{ id: communityData.id, name: communityData.name }],
|
||||
// collection: { id: collectionData.id, name: collectionData.name }
|
||||
// }))
|
||||
// );
|
||||
// }),
|
||||
// reduce((acc: any, value: any) => [...acc, ...value], []),
|
||||
// startWith([])
|
||||
// );
|
||||
|
||||
const searchTerm$ = this.searchField.valueChanges.pipe(
|
||||
debounceTime(200),
|
||||
@@ -227,8 +229,8 @@ export class SubmissionFormCollectionComponent implements OnChanges, OnInit {
|
||||
} else {
|
||||
return listCollection.filter((v) => v.collection.name.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1).slice(0, 5);
|
||||
}
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user