talkgroup pipe share wip
This commit is contained in:
parent
4d5dfb94cd
commit
ccd1830da9
2 changed files with 4 additions and 3 deletions
|
@ -5,6 +5,7 @@ import { CallRecord } from '../calls';
|
|||
import { environment } from '.././../environments/environment';
|
||||
import { TalkgroupService } from '../talkgroups/talkgroups.service';
|
||||
import { Talkgroup } from '../talkgroup';
|
||||
import { Share } from '../shares';
|
||||
|
||||
@Pipe({
|
||||
name: 'grabDate',
|
||||
|
@ -42,7 +43,7 @@ export class TimePipe implements PipeTransform {
|
|||
export class TalkgroupPipe implements PipeTransform {
|
||||
constructor(private tgService: TalkgroupService) {}
|
||||
|
||||
transform(call: CallRecord, field: string): Observable<string> {
|
||||
transform(call: CallRecord, field: string, share: Share|null = null): Observable<string> {
|
||||
return this.tgService.getTalkgroup(call.system_id, call.tgid).pipe(
|
||||
map((tg: Talkgroup) => {
|
||||
switch (field) {
|
||||
|
|
|
@ -76,13 +76,13 @@
|
|||
<ng-container matColumnDef="system">
|
||||
<th mat-header-cell *matHeaderCellDef>System</th>
|
||||
<td mat-cell *matCellDef="let call">
|
||||
{{ call | talkgroup: "system" | async }}
|
||||
{{ call | talkgroup: "system":incident | async }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="group">
|
||||
<th mat-header-cell *matHeaderCellDef>Group</th>
|
||||
<td mat-cell *matCellDef="let call">
|
||||
{{ call | talkgroup: "group" | async }}
|
||||
{{ call | talkgroup: "group":incident | async }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="talkgroup">
|
||||
|
|
Loading…
Add table
Reference in a new issue