From 14d71e74089b3ebfeea95d2d58dd382dcbd23125 Mon Sep 17 00:00:00 2001 From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:29:34 +0200 Subject: [PATCH] Add numeric score to the result row, as bitSortable does not support sorting by an object/object-ket (#11483) Co-authored-by: Daniel James Smith --- .../tools/reports/pages/weak-passwords-report.component.html | 2 +- .../tools/reports/pages/weak-passwords-report.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.html b/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.html index 4ee0e2986b..9c5b587e60 100644 --- a/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.html +++ b/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.html @@ -39,7 +39,7 @@ {{ "owner" | i18n }} - + {{ "weakness" | i18n }} diff --git a/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.ts b/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.ts index 7782e96e97..26ba4885e6 100644 --- a/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.ts +++ b/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.ts @@ -15,7 +15,7 @@ import { PasswordRepromptService } from "@bitwarden/vault"; import { CipherReportComponent } from "./cipher-report.component"; type ReportScore = { label: string; badgeVariant: BadgeVariant }; -type ReportResult = CipherView & { reportValue: ReportScore }; +type ReportResult = CipherView & { score: number; reportValue: ReportScore }; @Component({ selector: "app-weak-passwords-report", @@ -100,7 +100,7 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen if (result.score != null && result.score <= 2) { const scoreValue = this.scoreKey(result.score); - const row = { ...ciph, reportValue: scoreValue } as ReportResult; + const row = { ...ciph, score: result.score, reportValue: scoreValue } as ReportResult; this.weakPasswordCiphers.push(row); } });