Shares #109
3 changed files with 2 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { Component, inject } from '@angular/core';
|
import { Component, inject, Sanitizer } from '@angular/core';
|
||||||
import { tap } from 'rxjs/operators';
|
import { tap } from 'rxjs/operators';
|
||||||
import { CommonModule, Location } from '@angular/common';
|
import { CommonModule, Location } from '@angular/common';
|
||||||
import { BehaviorSubject, merge, Subscription } from 'rxjs';
|
import { BehaviorSubject, merge, Subscription } from 'rxjs';
|
||||||
|
|
|
@ -91,10 +91,6 @@ export class Talkgroup {
|
||||||
icon?: string,
|
icon?: string,
|
||||||
) {
|
) {
|
||||||
this.iconSvg = this.iconMap(this.metadata?.icon!);
|
this.iconSvg = this.iconMap(this.metadata?.icon!);
|
||||||
this.alert_rules = this.alert_rules.map((x) =>
|
|
||||||
Object.assign(new AlertRule(), x),
|
|
||||||
);
|
|
||||||
console.log(this.alert_rules);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iconMap(icon: string): string {
|
iconMap(icon: string): string {
|
||||||
|
|
|
@ -33,10 +33,7 @@ export class TalkgroupService {
|
||||||
private subscriptions = new Subscription();
|
private subscriptions = new Subscription();
|
||||||
constructor(private http: HttpClient) {
|
constructor(private http: HttpClient) {
|
||||||
this.tgs$ = this.fetchAll.pipe(switchMap(() => this.getTalkgroups()));
|
this.tgs$ = this.fetchAll.pipe(switchMap(() => this.getTalkgroups()));
|
||||||
this.tags$ = this.fetchAll.pipe(
|
this.tags$ = this.fetchAll.pipe(switchMap(() => this.getAllTags()), shareReplay());
|
||||||
switchMap(() => this.getAllTags()),
|
|
||||||
shareReplay(),
|
|
||||||
);
|
|
||||||
this.fillTgMap();
|
this.fillTgMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue