Source column
This commit is contained in:
parent
20b87abba1
commit
fb18abe685
4 changed files with 24 additions and 1 deletions
|
@ -4,6 +4,7 @@ export interface CallRecord {
|
|||
audioURL: string | null;
|
||||
duration: number;
|
||||
systemId: number;
|
||||
talkerAlias: string | null;
|
||||
tgid: number;
|
||||
incidents: number; // in incident
|
||||
}
|
||||
|
|
|
@ -168,6 +168,10 @@
|
|||
>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="talker">
|
||||
<th mat-header-cell *matHeaderCellDef>Source</th>
|
||||
<td mat-cell *matCellDef="let call" [innerHTML]="call | talker"></td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="duration">
|
||||
<th mat-header-cell *matHeaderCellDef class="durationHdr">Duration</th>
|
||||
<td mat-cell *matCellDef="let call" class="duration">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, ElementRef, inject, ViewChild } from '@angular/core';
|
||||
import { CommonModule, AsyncPipe } from '@angular/common';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatTable, MatTableModule } from '@angular/material/table';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import {
|
||||
MatPaginator,
|
||||
MatPaginatorModule,
|
||||
|
@ -19,6 +19,7 @@ import {
|
|||
DatePipe,
|
||||
DownloadURLPipe,
|
||||
FixedPointPipe,
|
||||
TalkerPipe,
|
||||
TalkgroupPipe,
|
||||
TimePipe,
|
||||
} from './calls.service';
|
||||
|
@ -57,6 +58,7 @@ const reqPageSize = 200;
|
|||
MatIconModule,
|
||||
FixedPointPipe,
|
||||
TalkgroupPipe,
|
||||
TalkerPipe,
|
||||
TimePipe,
|
||||
DatePipe,
|
||||
MatPaginatorModule,
|
||||
|
@ -95,6 +97,7 @@ export class CallsComponent {
|
|||
'system',
|
||||
'group',
|
||||
'talkgroup',
|
||||
'talker',
|
||||
'duration',
|
||||
];
|
||||
curPage = <PageEvent>{ pageIndex: 0, pageSize: 0 };
|
||||
|
|
|
@ -27,6 +27,21 @@ export class DatePipe implements PipeTransform {
|
|||
}
|
||||
}
|
||||
|
||||
@Pipe({
|
||||
name: 'talker',
|
||||
standalone: true,
|
||||
pure: true,
|
||||
})
|
||||
export class TalkerPipe implements PipeTransform {
|
||||
transform(call: CallRecord, args?: any): string {
|
||||
if (call.talkerAlias != null) {
|
||||
return call.talkerAlias;
|
||||
}
|
||||
|
||||
return '—';
|
||||
}
|
||||
}
|
||||
|
||||
@Pipe({
|
||||
name: 'time',
|
||||
standalone: true,
|
||||
|
|
Loading…
Add table
Reference in a new issue