From 9cbe295c74c3a2e81b04e6a244602b6b749addcc Mon Sep 17 00:00:00 2001
From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
Date: Wed, 5 Feb 2025 15:31:37 +0100
Subject: [PATCH] Revert "[PM-13404] Weak Passwords Report - Sort by password
weakness (#12359)" (#13263)
This reverts commit 582beaf70662a7708e3545d50b43876b02a884bc.
---
.../weak-passwords-report.component.html | 8 +------
.../pages/weak-passwords-report.component.ts | 24 -------------------
2 files changed, 1 insertion(+), 31 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 76d4398cc0f..9c5b587e60a 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,13 +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 8b781b77378..c374ecd0e4a 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
@@ -59,7 +59,6 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen
this.weakPasswordCiphers = [];
this.filterStatus = [0];
this.findWeakPasswords(allCiphers);
- this.weakPasswordCiphers = this.sortCiphers(this.weakPasswordCiphers, "score", false);
}
protected findWeakPasswords(ciphers: CipherView[]): void {
@@ -113,29 +112,6 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen
this.filterCiphersByOrg(this.weakPasswordCiphers);
}
- onSortChange(field: string, event: Event) {
- const target = event.target as HTMLInputElement;
- const ascending = target.checked;
- this.weakPasswordCiphers = this.sortCiphers(this.weakPasswordCiphers, field, ascending);
- }
-
- protected sortCiphers(
- ciphers: ReportResult[],
- field: string,
- ascending: boolean,
- ): ReportResult[] {
- return ciphers.sort((a, b) => {
- const aValue = a[field as keyof ReportResult];
- const bValue = b[field as keyof ReportResult];
-
- if (aValue === bValue) {
- return 0;
- }
- const comparison = aValue > bValue ? 1 : -1;
- return ascending ? comparison : -comparison;
- });
- }
-
protected canManageCipher(c: CipherView): boolean {
// this will only ever be false from the org view;
return true;