Entities map service updates
This commit is contained in:
parent
492ac8d7c0
commit
b040815b85
@ -12,6 +12,10 @@ export abstract class EntitiesMapService<E extends Entity<I>, I> {
|
|||||||
|
|
||||||
protected constructor(@Inject('ENTITY_PRIMARY_KEY') protected readonly _primaryKey: string) {}
|
protected constructor(@Inject('ENTITY_PRIMARY_KEY') protected readonly _primaryKey: string) {}
|
||||||
|
|
||||||
|
get empty(): boolean {
|
||||||
|
return this._map.size === 0;
|
||||||
|
}
|
||||||
|
|
||||||
get$(key: string) {
|
get$(key: string) {
|
||||||
if (!this._map.has(key)) {
|
if (!this._map.has(key)) {
|
||||||
this._map.set(key, new BehaviorSubject<E[]>([]));
|
this._map.set(key, new BehaviorSubject<E[]>([]));
|
||||||
@ -20,8 +24,8 @@ export abstract class EntitiesMapService<E extends Entity<I>, I> {
|
|||||||
return this._getBehaviourSubject(key).asObservable();
|
return this._getBehaviourSubject(key).asObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
has(dossierId: string) {
|
has(parentId: string) {
|
||||||
return this._map.has(dossierId);
|
return this._map.has(parentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
get(key: string): E[];
|
get(key: string): E[];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user