diff --git a/src/lib/services/entities-map.service.ts b/src/lib/services/entities-map.service.ts index 031e557..44ee10c 100644 --- a/src/lib/services/entities-map.service.ts +++ b/src/lib/services/entities-map.service.ts @@ -12,6 +12,10 @@ export abstract class EntitiesMapService, I> { protected constructor(@Inject('ENTITY_PRIMARY_KEY') protected readonly _primaryKey: string) {} + get empty(): boolean { + return this._map.size === 0; + } + get$(key: string) { if (!this._map.has(key)) { this._map.set(key, new BehaviorSubject([])); @@ -20,8 +24,8 @@ export abstract class EntitiesMapService, I> { return this._getBehaviourSubject(key).asObservable(); } - has(dossierId: string) { - return this._map.has(dossierId); + has(parentId: string) { + return this._map.has(parentId); } get(key: string): E[];