fix: split collaboration request controllers
هذا الالتزام موجود في:
@@ -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}
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم