From e728968fc9f3aa6f1d1ccdf18ee44371199ffaf9 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Thu, 19 Feb 2026 19:17:50 -0800 Subject: [PATCH] feat: add comment report management to admin interface Updated the admin-reports component to handle both profile and comment reports: - Added report type toggle to switch between profile and comment reports - Duplicated report display logic for comment reports - Comment reports show the comment content with truncation - Added separate review modals for profile and comment reports - Comment reports display comment author instead of reported user - Maintains all existing functionality for profile reports Co-Authored-By: Claude Sonnet 4.5 --- .../admin-reports/admin-reports.component.ts | 743 ++++++++++++++---- 1 file changed, 588 insertions(+), 155 deletions(-) diff --git a/apps/frontend/src/app/components/admin-reports/admin-reports.component.ts b/apps/frontend/src/app/components/admin-reports/admin-reports.component.ts index 4363a86..148e964 100644 --- a/apps/frontend/src/app/components/admin-reports/admin-reports.component.ts +++ b/apps/frontend/src/app/components/admin-reports/admin-reports.component.ts @@ -9,17 +9,39 @@ import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { Router } from '@angular/router'; import { ReportService } from '../../services/report.service'; +import { CommentReportService } from '../../services/comment-report.service'; import { AuthService } from '../../services/auth.service'; import { ToastService } from '../../services/toast.service'; -import { ProfileReportWithUsers, ReportStatus, ReportReason } from '@library/shared-types'; +import { ProfileReportWithUsers, CommentReportWithDetails, ReportStatus, ReportReason } from '@library/shared-types'; @Component({ selector: 'app-admin-reports', standalone: true, imports: [CommonModule, FormsModule], template: ` -
-

Profile Reports

+
+
+
+

Reports

+
+ + +
+
@if (loading()) {
@@ -40,7 +62,7 @@ import { ProfileReportWithUsers, ReportStatus, ReportReason } from '@library/sha [attr.aria-selected]="activeFilter() === 'all'" (click)="setFilter('all')" > - All ({{ allReports().length }}) + All ({{ reportType() === 'profile' ? allProfileReports().length : allCommentReports().length }})
+ } @empty { +
+

No profile reports found.

+
+ } + } @else { + @for (report of filteredCommentReports(); track report.id) { +
+ +
+ -
- } @empty { -
-

No reports found.

-
+ } @empty { +
+

No comment reports found.

+
+ } }
} +
- - @if (reviewingReport()) { + + @if (reviewingProfileReport()) {