Highlight incident UI

This commit is contained in:
Daniel Ponte 2025-01-07 20:48:45 -05:00
parent db5e6e7ad8
commit b68ba4872e
4 changed files with 10 additions and 4 deletions

View file

@ -4,6 +4,5 @@ export interface CallRecord {
duration: number;
system_id: number;
tgid: number;
system_name: string;
tg_name: string;
incidents: number; // in incident
}

View file

@ -169,7 +169,7 @@
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="columns; sticky: true"></tr>
<tr mat-row *matRowDef="let myRowData; columns: columns"></tr>
<tr mat-row *matRowDef="let row; columns: columns" [ngClass]="{'in-incident': row.incidents > 0}"></tr>
</table>
</div>
<div class="pagFoot">

View file

@ -96,3 +96,7 @@ form {
.tagSelect {
flex: 1 1 250px;
}
.in-incident {
background-color: rgb(59, 0, 59);
}

View file

@ -391,7 +391,10 @@ export class CallsComponent {
}
this.incSvc
.addRemoveCalls(res, <CallIncidentParams>{
add: this.selection.selected.map((s) => s.id),
add: this.selection.selected.map((s, i, a) => {
s.incidents++;
return s.id;
}),
})
.subscribe({
next: () => {