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 pull request #10800 from opf/implementation/41849-adapt-the-style-of-the-attachments-section-to-the-new-designs

Eric Schubert1630edab9064
diff --cc frontend/src/app/core/state/resource-collection.service.ts
index 7b9a16b4966,da377a0f54e..1f99b00bb28
--- a/frontend/src/app/core/state/resource-collection.service.ts
+++ b/frontend/src/app/core/state/resource-collection.service.ts
@@@ -85,32 -84,13 +85,27 @@@ export abstract class ResourceCollectio
}
/**
- * Lookup a single entity from the store
+ * Checks, if the store already has a resource loaded by id.
* @param id
*/
- lookupMultiple(id:ID):Observable<T> {
- return this
- .query
- .selectEntity(id)
- .pipe(
- filter((entity) => entity !== undefined),
- ) as Observable<T>;
+ exists(id:ID):boolean {
+ return this.query.hasEntity(id);
}
+ /**
+ * Clear a collection key
+ * @param key Collection key to clear
+ */
+ clear(key:string):void {
+ this
+ .store
+ .update(
+ ({ collections }) => ({
+ collections: omit(collections, key),
+ }),
+ );
+ }
+
/**
* Update a single entity in the store
*