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 148e964..193914f 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 @@ -387,6 +387,27 @@ import { ProfileReportWithUsers, CommentReportWithDetails, ReportStatus, ReportR

{{ reviewingProfileReport()!.details }}

+ +
+ Admin Actions: +
+ + +
+
+
@@ -501,6 +522,27 @@ import { ProfileReportWithUsers, CommentReportWithDetails, ReportStatus, ReportR

{{ reviewingCommentReport()!.details }}

+ +
+ Admin Actions: +
+ + +
+
+
@@ -1030,6 +1072,50 @@ import { ProfileReportWithUsers, CommentReportWithDetails, ReportStatus, ReportR margin: 0; } + /* Admin Actions */ + .admin-actions { + margin-bottom: 1.5rem; + padding: 1rem; + background: var(--witch-lavender); + border-radius: 8px; + } + + .admin-actions strong { + display: block; + margin-bottom: 0.75rem; + color: var(--witch-purple); + font-weight: 600; + } + + .action-buttons { + display: flex; + gap: 0.75rem; + flex-wrap: wrap; + } + + .btn-sm { + padding: 0.5rem 1rem; + font-size: 0.875rem; + } + + .btn-warning { + background: #f59e0b; + color: white; + } + + .btn-warning:hover:not(:disabled) { + background: #d97706; + } + + .btn-danger { + background: #ef4444; + color: white; + } + + .btn-danger:hover:not(:disabled) { + background: #dc2626; + } + /* Review Form */ .review-form { display: flex; @@ -1398,4 +1484,43 @@ export class AdminReportsComponent implements OnInit { minute: '2-digit' }); } + + editComment(report: CommentReportWithDetails): void { + const commentId = report.reportedComment.id; + const newContent = prompt('Edit comment content:', report.reportedComment.content); + + if (newContent !== null && newContent.trim() !== '') { + // TODO: Implement comment editing API call + this.toastService.success('Comment edit functionality coming soon'); + } + } + + deleteComment(report: CommentReportWithDetails): void { + const commentAuthor = report.reportedComment.user.username; + const confirmed = confirm(`Are you sure you want to delete this comment by ${commentAuthor}?`); + + if (confirmed) { + // TODO: Implement comment deletion API call + this.toastService.success('Comment delete functionality coming soon'); + } + } + + editProfile(report: ProfileReportWithUsers): void { + const userId = report.reportedUser.id; + const username = report.reportedUser.username; + + // Navigate to profile edit page or open edit modal + this.router.navigate(['/profile', username]); + this.toastService.success('Navigate to profile to edit'); + } + + makeProfilePrivate(report: ProfileReportWithUsers): void { + const username = report.reportedUser.username; + const confirmed = confirm(`Are you sure you want to make ${username}'s profile private?`); + + if (confirmed) { + // TODO: Implement make profile private API call + this.toastService.success('Profile privacy functionality coming soon'); + } + } }