fix: split collaboration request controllers

هذا الالتزام موجود في:
boutmoun123
2026-05-31 17:05:58 +03:00
الأصل 49e132909e
التزام 1973b8b904
10 ملفات معدلة مع 402 إضافات و18 حذوفات

عرض الملف

@@ -64,6 +64,18 @@ function statusVariant(status: ReportStatus): "success" | "muted" | "warning" |
return "danger";
}
function recommendedAction(report: PlatformReport | null) {
if (!report) return "Select a report to see the recommended moderation action.";
if (report.status === "resolved" || report.status === "rejected") return "No action required after final status.";
if (["harassment", "hate_speech", "violence", "self_harm"].includes(report.reason)) {
return "Prioritize review and consider restricting the target if evidence is clear.";
}
if (report.reason === "spam" || report.reason === "scam") {
return "Check reporter history, target repetition, and related accounts before resolving.";
}
return "Review the target content and add a resolution note before changing status.";
}
export default function ReportsPage() {
const { permissions } = useSuperAdminSession();
const [statusFilter, setStatusFilter] = useState("open");
@@ -311,6 +323,11 @@ export default function ReportsPage() {
</div>
</div>
<div className="rounded-xl border border-border/70 bg-background/30 p-4">
<div className="text-sm font-medium text-foreground">Recommended action</div>
<p className="mt-2 text-sm text-muted-foreground">{recommendedAction(selectedReport)}</p>
</div>
<Textarea
placeholder="Resolution note"
value={resolutionNote}