Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Merge branch 'refactor/collection-service' into implementation/47501-open-file-picker-based-on-project-folder-from-database

Eric Schubert29db36baa106
diff --cc frontend/src/app/core/state/resource-store.service.ts
index 5783f55f616,4b4dee60bbc..df04c04ecd3
--- a/frontend/src/app/core/state/resource-store.service.ts
+++ b/frontend/src/app/core/state/resource-store.service.ts
@@@ -118,13 -140,15 +140,15 @@@ export abstract class ResourceStoreServ
/**
* Return a collection observable that triggers only when the collection is loaded.
- * @param key
+ * @param input List params to require, or href of the resource
*/
- loadedCollection(key:string):Observable<T[]> {
+ loadedCollection(input:ResourceKeyInput):Observable<T[]> {
+ const href = this.buildResourceLink(input);
+
return this
- .collectionState(key)
+ .collectionState(href)
.pipe(
- filter((collection) => !!collection),
+ filter(isDefinedEntity),
switchMap((collection:CollectionResponse) => this.query.selectMany(collection.ids)),
);
}
diff --cc frontend/src/app/core/state/resource-store.ts
index 3969bc09f4b,5d00994a942..241df9c1e5d
--- a/frontend/src/app/core/state/resource-store.ts
+++ b/frontend/src/app/core/state/resource-store.ts
@@@ -5,10 -5,10 +5,6 @@@ import
ID,
} from '@datorama/akita';
import { IHALCollection } from 'core-app/core/apiv3/types/hal-collection.type';
--import {
-- ApiV3ListParameters,
-- listParamsString,
--} from 'core-app/core/apiv3/paths/apiv3-list-resource.interface';
import { IHalResourceLinks } from 'core-app/core/state/hal-resource';
import idFromLink from 'core-app/features/hal/helpers/id-from-link';
import { filter } from 'lodash';