From b68ba4872ef8bd764acf04f0046521947bd59ff0 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Tue, 7 Jan 2025 20:48:45 -0500 Subject: [PATCH] Highlight incident UI --- client/stillbox/src/app/calls.ts | 3 +-- client/stillbox/src/app/calls/calls.component.html | 2 +- client/stillbox/src/app/calls/calls.component.scss | 4 ++++ client/stillbox/src/app/calls/calls.component.ts | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/stillbox/src/app/calls.ts b/client/stillbox/src/app/calls.ts index 1da3392..ccd51ee 100644 --- a/client/stillbox/src/app/calls.ts +++ b/client/stillbox/src/app/calls.ts @@ -4,6 +4,5 @@ export interface CallRecord { duration: number; system_id: number; tgid: number; - system_name: string; - tg_name: string; + incidents: number; // in incident } diff --git a/client/stillbox/src/app/calls/calls.component.html b/client/stillbox/src/app/calls/calls.component.html index 100cc73..3cbc7a4 100644 --- a/client/stillbox/src/app/calls/calls.component.html +++ b/client/stillbox/src/app/calls/calls.component.html @@ -169,7 +169,7 @@ - +
diff --git a/client/stillbox/src/app/calls/calls.component.scss b/client/stillbox/src/app/calls/calls.component.scss index d46d981..01e9628 100644 --- a/client/stillbox/src/app/calls/calls.component.scss +++ b/client/stillbox/src/app/calls/calls.component.scss @@ -96,3 +96,7 @@ form { .tagSelect { flex: 1 1 250px; } + +.in-incident { + background-color: rgb(59, 0, 59); +} diff --git a/client/stillbox/src/app/calls/calls.component.ts b/client/stillbox/src/app/calls/calls.component.ts index f6432c1..5ff0ae1 100644 --- a/client/stillbox/src/app/calls/calls.component.ts +++ b/client/stillbox/src/app/calls/calls.component.ts @@ -391,7 +391,10 @@ export class CallsComponent { } this.incSvc .addRemoveCalls(res, { - add: this.selection.selected.map((s) => s.id), + add: this.selection.selected.map((s, i, a) => { + s.incidents++; + return s.id; + }), }) .subscribe({ next: () => {