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;
|
audioURL: string | null;
|
||||||
duration: number;
|
duration: number;
|
||||||
systemId: number;
|
systemId: number;
|
||||||
|
talkerAlias: string | null;
|
||||||
tgid: number;
|
tgid: number;
|
||||||
incidents: number; // in incident
|
incidents: number; // in incident
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,6 +168,10 @@
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</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">
|
<ng-container matColumnDef="duration">
|
||||||
<th mat-header-cell *matHeaderCellDef class="durationHdr">Duration</th>
|
<th mat-header-cell *matHeaderCellDef class="durationHdr">Duration</th>
|
||||||
<td mat-cell *matCellDef="let call" class="duration">
|
<td mat-cell *matCellDef="let call" class="duration">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, ElementRef, inject, ViewChild } from '@angular/core';
|
import { Component, ElementRef, inject, ViewChild } from '@angular/core';
|
||||||
import { CommonModule, AsyncPipe } from '@angular/common';
|
import { CommonModule, AsyncPipe } from '@angular/common';
|
||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||||
import { MatTable, MatTableModule } from '@angular/material/table';
|
import { MatTableModule } from '@angular/material/table';
|
||||||
import {
|
import {
|
||||||
MatPaginator,
|
MatPaginator,
|
||||||
MatPaginatorModule,
|
MatPaginatorModule,
|
||||||
|
@ -19,6 +19,7 @@ import {
|
||||||
DatePipe,
|
DatePipe,
|
||||||
DownloadURLPipe,
|
DownloadURLPipe,
|
||||||
FixedPointPipe,
|
FixedPointPipe,
|
||||||
|
TalkerPipe,
|
||||||
TalkgroupPipe,
|
TalkgroupPipe,
|
||||||
TimePipe,
|
TimePipe,
|
||||||
} from './calls.service';
|
} from './calls.service';
|
||||||
|
@ -57,6 +58,7 @@ const reqPageSize = 200;
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
FixedPointPipe,
|
FixedPointPipe,
|
||||||
TalkgroupPipe,
|
TalkgroupPipe,
|
||||||
|
TalkerPipe,
|
||||||
TimePipe,
|
TimePipe,
|
||||||
DatePipe,
|
DatePipe,
|
||||||
MatPaginatorModule,
|
MatPaginatorModule,
|
||||||
|
@ -95,6 +97,7 @@ export class CallsComponent {
|
||||||
'system',
|
'system',
|
||||||
'group',
|
'group',
|
||||||
'talkgroup',
|
'talkgroup',
|
||||||
|
'talker',
|
||||||
'duration',
|
'duration',
|
||||||
];
|
];
|
||||||
curPage = <PageEvent>{ pageIndex: 0, pageSize: 0 };
|
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({
|
@Pipe({
|
||||||
name: 'time',
|
name: 'time',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue