Prettier format pending files
This commit is contained in:
parent
6c6817709c
commit
457a66ccc3
11 changed files with 178 additions and 78 deletions
|
|
@ -2,7 +2,7 @@ import { createClient } from "@supabase/supabase-js";
|
|||
|
||||
const supabase = createClient(
|
||||
process.env.SUPABASE_URL || "",
|
||||
process.env.SUPABASE_SERVICE_ROLE || ""
|
||||
process.env.SUPABASE_SERVICE_ROLE || "",
|
||||
);
|
||||
|
||||
interface StaffMemberUpdate {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { corsHeaders } from "../_cors";
|
|||
|
||||
const supabase = createClient(
|
||||
process.env.SUPABASE_URL || "",
|
||||
process.env.SUPABASE_SERVICE_ROLE || ""
|
||||
process.env.SUPABASE_SERVICE_ROLE || "",
|
||||
);
|
||||
|
||||
interface StaffMember {
|
||||
|
|
|
|||
|
|
@ -372,7 +372,6 @@ const App = () => (
|
|||
/>
|
||||
<Route path="/community/:tabId" element={<Community />} />
|
||||
|
||||
|
||||
<Route path="/support" element={<Support />} />
|
||||
<Route path="/status" element={<Status />} />
|
||||
<Route path="/changelog" element={<Changelog />} />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Progress } from "@/components/ui/progress";
|
||||
import { Trophy, TrendingUp, Star } from "lucide-react";
|
||||
|
|
@ -163,7 +169,9 @@ export default function AdminStaffAchievements() {
|
|||
achievements.length
|
||||
).toFixed(1)}
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground mt-1">members per achievement</p>
|
||||
<p className="text-xs text-muted-foreground mt-1">
|
||||
members per achievement
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
|
@ -201,7 +209,9 @@ export default function AdminStaffAchievements() {
|
|||
<Card
|
||||
key={achievement.id}
|
||||
className={
|
||||
achievement.completed ? "border-green-200 dark:border-green-900" : ""
|
||||
achievement.completed
|
||||
? "border-green-200 dark:border-green-900"
|
||||
: ""
|
||||
}
|
||||
>
|
||||
<CardHeader className="pb-3">
|
||||
|
|
@ -212,9 +222,7 @@ export default function AdminStaffAchievements() {
|
|||
<CardTitle className="text-lg">
|
||||
{achievement.name}
|
||||
</CardTitle>
|
||||
<CardDescription>
|
||||
{achievement.description}
|
||||
</CardDescription>
|
||||
<CardDescription>{achievement.description}</CardDescription>
|
||||
</div>
|
||||
</div>
|
||||
<Badge className={getRarityColor(achievement.rarity)}>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
|
|
@ -55,11 +61,11 @@ export default function AdminStaffAdmin() {
|
|||
|
||||
const getStatusColor = (status: string) => {
|
||||
const colors: Record<string, string> = {
|
||||
active: "bg-green-100 text-green-900 dark:bg-green-900/30 dark:text-green-200",
|
||||
active:
|
||||
"bg-green-100 text-green-900 dark:bg-green-900/30 dark:text-green-200",
|
||||
inactive:
|
||||
"bg-gray-100 text-gray-900 dark:bg-gray-900/30 dark:text-gray-200",
|
||||
suspended:
|
||||
"bg-red-100 text-red-900 dark:bg-red-900/30 dark:text-red-200",
|
||||
suspended: "bg-red-100 text-red-900 dark:bg-red-900/30 dark:text-red-200",
|
||||
};
|
||||
return colors[status] || colors.inactive;
|
||||
};
|
||||
|
|
@ -106,7 +112,9 @@ export default function AdminStaffAdmin() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>User Management</CardTitle>
|
||||
<CardDescription>Manage staff accounts and access</CardDescription>
|
||||
<CardDescription>
|
||||
Manage staff accounts and access
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="space-y-3">
|
||||
|
|
@ -117,7 +125,9 @@ export default function AdminStaffAdmin() {
|
|||
>
|
||||
<div className="flex-1">
|
||||
<p className="font-medium">{user.name}</p>
|
||||
<p className="text-sm text-muted-foreground">{user.email}</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{user.email}
|
||||
</p>
|
||||
<div className="flex gap-2 mt-2">
|
||||
<Badge variant="outline">{user.role}</Badge>
|
||||
<Badge className={getStatusColor(user.status)}>
|
||||
|
|
@ -140,7 +150,9 @@ export default function AdminStaffAdmin() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Role Permissions</CardTitle>
|
||||
<CardDescription>Define what each role can access</CardDescription>
|
||||
<CardDescription>
|
||||
Define what each role can access
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="overflow-x-auto">
|
||||
|
|
@ -155,7 +167,10 @@ export default function AdminStaffAdmin() {
|
|||
</thead>
|
||||
<tbody>
|
||||
{permissions.map((perm) => (
|
||||
<tr key={perm.feature} className="border-b hover:bg-slate-50 dark:hover:bg-slate-900/50">
|
||||
<tr
|
||||
key={perm.feature}
|
||||
className="border-b hover:bg-slate-50 dark:hover:bg-slate-900/50"
|
||||
>
|
||||
<td className="p-2 font-medium">{perm.feature}</td>
|
||||
<td className="text-center p-2">
|
||||
{perm.owner ? (
|
||||
|
|
@ -198,11 +213,15 @@ export default function AdminStaffAdmin() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>System Settings</CardTitle>
|
||||
<CardDescription>Configure global system parameters</CardDescription>
|
||||
<CardDescription>
|
||||
Configure global system parameters
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<div className="p-3 border border-border/40 rounded-lg bg-background/40">
|
||||
<label className="block font-medium mb-2">Session Timeout</label>
|
||||
<label className="block font-medium mb-2">
|
||||
Session Timeout
|
||||
</label>
|
||||
<select className="w-full border border-input rounded p-2 bg-background">
|
||||
<option>12 hours</option>
|
||||
<option selected>24 hours</option>
|
||||
|
|
@ -217,9 +236,7 @@ export default function AdminStaffAdmin() {
|
|||
<input type="checkbox" defaultChecked /> Enabled
|
||||
</div>
|
||||
<div className="p-3 border border-border/40 rounded-lg bg-background/40">
|
||||
<label className="block font-medium mb-2">
|
||||
Audit Logging
|
||||
</label>
|
||||
<label className="block font-medium mb-2">Audit Logging</label>
|
||||
<input type="checkbox" defaultChecked /> Enabled
|
||||
</div>
|
||||
</CardContent>
|
||||
|
|
@ -247,7 +264,9 @@ export default function AdminStaffAdmin() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Audit Log</CardTitle>
|
||||
<CardDescription>Track all administrative actions</CardDescription>
|
||||
<CardDescription>
|
||||
Track all administrative actions
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="space-y-2 text-sm">
|
||||
|
|
@ -273,7 +292,9 @@ export default function AdminStaffAdmin() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>System Maintenance</CardTitle>
|
||||
<CardDescription>Administrative tools and utilities</CardDescription>
|
||||
<CardDescription>
|
||||
Administrative tools and utilities
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-3">
|
||||
<Button variant="outline" className="w-full">
|
||||
|
|
@ -285,11 +306,7 @@ export default function AdminStaffAdmin() {
|
|||
<Button variant="outline" className="w-full">
|
||||
Generate Report
|
||||
</Button>
|
||||
<Button
|
||||
variant="destructive"
|
||||
className="w-full mt-4"
|
||||
disabled
|
||||
>
|
||||
<Button variant="destructive" className="w-full mt-4" disabled>
|
||||
Emergency Shutdown (Disabled)
|
||||
</Button>
|
||||
</CardContent>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
|
|
@ -57,7 +63,8 @@ export default function AdminStaffChat() {
|
|||
{
|
||||
id: "1",
|
||||
author: "Alex Chen",
|
||||
content: "Good morning everyone! Starting weekly standup in 10 minutes.",
|
||||
content:
|
||||
"Good morning everyone! Starting weekly standup in 10 minutes.",
|
||||
timestamp: "09:50",
|
||||
},
|
||||
{
|
||||
|
|
@ -178,14 +185,19 @@ export default function AdminStaffChat() {
|
|||
{/* Messages */}
|
||||
<CardContent className="flex-1 overflow-y-auto p-4 space-y-3">
|
||||
{currentMessages.map((msg) => (
|
||||
<div key={msg.id} className="flex gap-3 hover:bg-slate-50 dark:hover:bg-slate-900/50 p-2 rounded">
|
||||
<div
|
||||
key={msg.id}
|
||||
className="flex gap-3 hover:bg-slate-50 dark:hover:bg-slate-900/50 p-2 rounded"
|
||||
>
|
||||
<div className="w-8 h-8 bg-blue-200 dark:bg-blue-900 rounded-full flex items-center justify-center text-sm font-bold text-blue-900 dark:text-blue-200 flex-shrink-0">
|
||||
{msg.author[0]}
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="flex items-baseline gap-2">
|
||||
<span className="font-medium text-sm">{msg.author}</span>
|
||||
<span className="text-xs text-muted-foreground">{msg.timestamp}</span>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{msg.timestamp}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-sm mt-1">{msg.content}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,23 @@
|
|||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Mail, Phone, MapPin, Search, Edit2, X, Trash2, Sparkles } from "lucide-react";
|
||||
import {
|
||||
Mail,
|
||||
Phone,
|
||||
MapPin,
|
||||
Search,
|
||||
Edit2,
|
||||
X,
|
||||
Trash2,
|
||||
Sparkles,
|
||||
} from "lucide-react";
|
||||
import { useState, useMemo, useEffect } from "react";
|
||||
import { aethexToast } from "@/lib/aethex-toast";
|
||||
import {
|
||||
|
|
@ -54,8 +69,7 @@ export default function AdminStaffDirectory() {
|
|||
console.error("Error fetching staff members:", error);
|
||||
aethexToast.error({
|
||||
title: "Failed to load staff members",
|
||||
description:
|
||||
error instanceof Error ? error.message : "Unknown error",
|
||||
description: error instanceof Error ? error.message : "Unknown error",
|
||||
});
|
||||
setTeamMembers([]);
|
||||
} finally {
|
||||
|
|
@ -110,17 +124,21 @@ export default function AdminStaffDirectory() {
|
|||
member.department
|
||||
.toLowerCase()
|
||||
.includes(searchQuery.toLowerCase())) ||
|
||||
member.email.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
member.email.toLowerCase().includes(searchQuery.toLowerCase()),
|
||||
);
|
||||
}, [searchQuery, teamMembers]);
|
||||
|
||||
const getRoleBadgeColor = (role: TeamMember["role"]) => {
|
||||
const colors: Record<TeamMember["role"], string> = {
|
||||
owner: "bg-purple-100 text-purple-900 dark:bg-purple-900/30 dark:text-purple-200",
|
||||
owner:
|
||||
"bg-purple-100 text-purple-900 dark:bg-purple-900/30 dark:text-purple-200",
|
||||
admin: "bg-blue-100 text-blue-900 dark:bg-blue-900/30 dark:text-blue-200",
|
||||
founder: "bg-pink-100 text-pink-900 dark:bg-pink-900/30 dark:text-pink-200",
|
||||
staff: "bg-green-100 text-green-900 dark:bg-green-900/30 dark:text-green-200",
|
||||
employee: "bg-gray-100 text-gray-900 dark:bg-gray-900/30 dark:text-gray-200",
|
||||
founder:
|
||||
"bg-pink-100 text-pink-900 dark:bg-pink-900/30 dark:text-pink-200",
|
||||
staff:
|
||||
"bg-green-100 text-green-900 dark:bg-green-900/30 dark:text-green-200",
|
||||
employee:
|
||||
"bg-gray-100 text-gray-900 dark:bg-gray-900/30 dark:text-gray-200",
|
||||
};
|
||||
return colors[role];
|
||||
};
|
||||
|
|
@ -149,17 +167,19 @@ export default function AdminStaffDirectory() {
|
|||
phone: formData.phone,
|
||||
role: formData.role,
|
||||
}),
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const updatedMember = await response.json();
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(updatedMember.details || updatedMember.error || "Failed to save");
|
||||
throw new Error(
|
||||
updatedMember.details || updatedMember.error || "Failed to save",
|
||||
);
|
||||
}
|
||||
|
||||
setTeamMembers(
|
||||
teamMembers.map((m) => (m.id === updatedMember.id ? updatedMember : m))
|
||||
teamMembers.map((m) => (m.id === updatedMember.id ? updatedMember : m)),
|
||||
);
|
||||
|
||||
aethexToast.success({
|
||||
|
|
@ -184,7 +204,7 @@ export default function AdminStaffDirectory() {
|
|||
const handleDelete = async (memberId: string, memberName: string) => {
|
||||
if (
|
||||
!confirm(
|
||||
`Are you sure you want to delete ${memberName}? This action cannot be undone.`
|
||||
`Are you sure you want to delete ${memberName}? This action cannot be undone.`,
|
||||
)
|
||||
) {
|
||||
return;
|
||||
|
|
@ -224,10 +244,7 @@ export default function AdminStaffDirectory() {
|
|||
}
|
||||
};
|
||||
|
||||
const handleFormChange = (
|
||||
field: keyof TeamMember,
|
||||
value: string
|
||||
) => {
|
||||
const handleFormChange = (field: keyof TeamMember, value: string) => {
|
||||
if (formData) {
|
||||
setFormData({ ...formData, [field]: value });
|
||||
}
|
||||
|
|
@ -280,10 +297,13 @@ export default function AdminStaffDirectory() {
|
|||
className="bg-blue-600 hover:bg-blue-700"
|
||||
>
|
||||
<Sparkles className="w-4 h-4 mr-2" />
|
||||
{isSeeding ? "Creating sample data..." : "Initialize with Sample Data"}
|
||||
{isSeeding
|
||||
? "Creating sample data..."
|
||||
: "Initialize with Sample Data"}
|
||||
</Button>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
This creates 8 sample team members that you can edit to match your actual team.
|
||||
This creates 8 sample team members that you can edit to match your
|
||||
actual team.
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
@ -374,7 +394,9 @@ export default function AdminStaffDirectory() {
|
|||
<label className="text-sm font-medium">Full Name</label>
|
||||
<Input
|
||||
value={formData.full_name}
|
||||
onChange={(e) => handleFormChange("full_name", e.target.value)}
|
||||
onChange={(e) =>
|
||||
handleFormChange("full_name", e.target.value)
|
||||
}
|
||||
placeholder="Full name"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -402,7 +424,9 @@ export default function AdminStaffDirectory() {
|
|||
<label className="text-sm font-medium">Department</label>
|
||||
<Input
|
||||
value={formData.department || ""}
|
||||
onChange={(e) => handleFormChange("department", e.target.value)}
|
||||
onChange={(e) =>
|
||||
handleFormChange("department", e.target.value)
|
||||
}
|
||||
placeholder="Department name"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -423,7 +447,7 @@ export default function AdminStaffDirectory() {
|
|||
onChange={(e) =>
|
||||
handleFormChange(
|
||||
"role",
|
||||
e.target.value as TeamMember["role"]
|
||||
e.target.value as TeamMember["role"],
|
||||
)
|
||||
}
|
||||
className="w-full px-3 py-2 border border-input rounded-md bg-background text-foreground"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Lock, Copy } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
|
|
@ -21,12 +27,14 @@ export default function AdminStaffDocs() {
|
|||
{
|
||||
title: "Security Protocols",
|
||||
description: "Internal security guidelines and best practices",
|
||||
content: "Two-factor authentication required\nSession timeout: 24 hours\nAudit logging enabled",
|
||||
content:
|
||||
"Two-factor authentication required\nSession timeout: 24 hours\nAudit logging enabled",
|
||||
},
|
||||
{
|
||||
title: "Operational Procedures",
|
||||
description: "Day-to-day operational workflows",
|
||||
content: "Daily standup: 10 AM UTC\nWeekly review: Friday 2 PM UTC\nIncident response: 15 min SLA",
|
||||
content:
|
||||
"Daily standup: 10 AM UTC\nWeekly review: Friday 2 PM UTC\nIncident response: 15 min SLA",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -78,7 +86,9 @@ export default function AdminStaffDocs() {
|
|||
<Lock className="w-5 h-5 text-red-600" />
|
||||
<CardTitle className="text-lg">API Keys & Credentials</CardTitle>
|
||||
</div>
|
||||
<CardDescription>Manage sensitive credentials with caution</CardDescription>
|
||||
<CardDescription>
|
||||
Manage sensitive credentials with caution
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="space-y-3">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,19 @@
|
|||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { AlertCircle, CheckCircle2, Clock, Users, TrendingUp } from "lucide-react";
|
||||
import {
|
||||
AlertCircle,
|
||||
CheckCircle2,
|
||||
Clock,
|
||||
Users,
|
||||
TrendingUp,
|
||||
} from "lucide-react";
|
||||
import { useState } from "react";
|
||||
|
||||
interface Report {
|
||||
|
|
@ -139,12 +151,12 @@ export default function AdminStaffOperations() {
|
|||
|
||||
const getStatusIcon = (status: string) => {
|
||||
const icons: Record<string, React.ReactNode> = {
|
||||
"open": <AlertCircle className="w-4 h-4 text-red-500" />,
|
||||
open: <AlertCircle className="w-4 h-4 text-red-500" />,
|
||||
"in-review": <Clock className="w-4 h-4 text-yellow-500" />,
|
||||
"resolved": <CheckCircle2 className="w-4 h-4 text-green-500" />,
|
||||
"pending": <Clock className="w-4 h-4 text-yellow-500" />,
|
||||
"accepted": <CheckCircle2 className="w-4 h-4 text-green-500" />,
|
||||
"completed": <CheckCircle2 className="w-4 h-4 text-green-500" />,
|
||||
resolved: <CheckCircle2 className="w-4 h-4 text-green-500" />,
|
||||
pending: <Clock className="w-4 h-4 text-yellow-500" />,
|
||||
accepted: <CheckCircle2 className="w-4 h-4 text-green-500" />,
|
||||
completed: <CheckCircle2 className="w-4 h-4 text-green-500" />,
|
||||
};
|
||||
return icons[status];
|
||||
};
|
||||
|
|
@ -183,7 +195,11 @@ export default function AdminStaffOperations() {
|
|||
</div>
|
||||
|
||||
{/* Tabs */}
|
||||
<Tabs value={operationTab} onValueChange={setOperationTab} className="space-y-4">
|
||||
<Tabs
|
||||
value={operationTab}
|
||||
onValueChange={setOperationTab}
|
||||
className="space-y-4"
|
||||
>
|
||||
<TabsList className="grid w-full grid-cols-3">
|
||||
<TabsTrigger value="overview">Overview</TabsTrigger>
|
||||
<TabsTrigger value="moderation">Moderation</TabsTrigger>
|
||||
|
|
@ -195,7 +211,9 @@ export default function AdminStaffOperations() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>System Status</CardTitle>
|
||||
<CardDescription>Overall platform health and activity</CardDescription>
|
||||
<CardDescription>
|
||||
Overall platform health and activity
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<div className="p-3 border border-green-200 dark:border-green-900 bg-green-50 dark:bg-green-900/10 rounded-lg">
|
||||
|
|
@ -225,7 +243,9 @@ export default function AdminStaffOperations() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Reports & Moderation</CardTitle>
|
||||
<CardDescription>Community reports and moderation actions</CardDescription>
|
||||
<CardDescription>
|
||||
Community reports and moderation actions
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-3">
|
||||
{reports.map((report) => (
|
||||
|
|
@ -263,7 +283,9 @@ export default function AdminStaffOperations() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Mentorship Program</CardTitle>
|
||||
<CardDescription>Track mentorship requests and matches</CardDescription>
|
||||
<CardDescription>
|
||||
Track mentorship requests and matches
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-3">
|
||||
{mentorshipRequests.map((req) => (
|
||||
|
|
@ -293,7 +315,9 @@ export default function AdminStaffOperations() {
|
|||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>User Management</CardTitle>
|
||||
<CardDescription>Current user status and activity</CardDescription>
|
||||
<CardDescription>
|
||||
Current user status and activity
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="space-y-2">
|
||||
|
|
|
|||
|
|
@ -80,7 +80,11 @@ export default function NotificationBell({
|
|||
.getUserNotifications(user.id)
|
||||
.then((data) => {
|
||||
if (!isActive) return;
|
||||
console.debug("[Notifications] Loaded", Array.isArray(data) ? data.length : 0, "notifications");
|
||||
console.debug(
|
||||
"[Notifications] Loaded",
|
||||
Array.isArray(data) ? data.length : 0,
|
||||
"notifications",
|
||||
);
|
||||
setNotifications(
|
||||
Array.isArray(data) ? (data as AethexNotification[]) : [],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4801,11 +4801,9 @@ export function createServer() {
|
|||
req.body;
|
||||
|
||||
if (!reported_user_id || !report_type || !reporter_id) {
|
||||
return res
|
||||
.status(400)
|
||||
.json({
|
||||
error: "reported_user_id, report_type, and reporter_id required",
|
||||
});
|
||||
return res.status(400).json({
|
||||
error: "reported_user_id, report_type, and reporter_id required",
|
||||
});
|
||||
}
|
||||
|
||||
const { data, error } = await adminSupabase
|
||||
|
|
@ -4980,7 +4978,11 @@ export function createServer() {
|
|||
});
|
||||
}
|
||||
|
||||
console.log("[Staff Seed Success] Inserted", data?.length || 0, "members");
|
||||
console.log(
|
||||
"[Staff Seed Success] Inserted",
|
||||
data?.length || 0,
|
||||
"members",
|
||||
);
|
||||
|
||||
const response = {
|
||||
success: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue