From 457a66ccc384e7c91a45b12f5c4bfe37d86a71c1 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 11 Nov 2025 02:44:36 +0000 Subject: [PATCH] Prettier format pending files --- api/staff/members-detail.ts | 2 +- api/staff/members.ts | 2 +- client/App.tsx | 1 - .../admin/AdminStaffAchievements.tsx | 20 ++++-- client/components/admin/AdminStaffAdmin.tsx | 57 ++++++++++------ client/components/admin/AdminStaffChat.tsx | 20 ++++-- .../components/admin/AdminStaffDirectory.tsx | 68 +++++++++++++------ client/components/admin/AdminStaffDocs.tsx | 18 +++-- .../components/admin/AdminStaffOperations.tsx | 48 +++++++++---- .../notifications/NotificationBell.tsx | 6 +- server/index.ts | 14 ++-- 11 files changed, 178 insertions(+), 78 deletions(-) diff --git a/api/staff/members-detail.ts b/api/staff/members-detail.ts index a2b519ad..ae3771bc 100644 --- a/api/staff/members-detail.ts +++ b/api/staff/members-detail.ts @@ -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 { diff --git a/api/staff/members.ts b/api/staff/members.ts index 5626a8f6..260fdafb 100644 --- a/api/staff/members.ts +++ b/api/staff/members.ts @@ -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 { diff --git a/client/App.tsx b/client/App.tsx index b5bbf63f..5a0fc115 100644 --- a/client/App.tsx +++ b/client/App.tsx @@ -372,7 +372,6 @@ const App = () => ( /> } /> - } /> } /> } /> diff --git a/client/components/admin/AdminStaffAchievements.tsx b/client/components/admin/AdminStaffAchievements.tsx index d47fd378..588e5dce 100644 --- a/client/components/admin/AdminStaffAchievements.tsx +++ b/client/components/admin/AdminStaffAchievements.tsx @@ -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)} -

members per achievement

+

+ members per achievement +

@@ -201,7 +209,9 @@ export default function AdminStaffAchievements() { @@ -212,9 +222,7 @@ export default function AdminStaffAchievements() { {achievement.name} - - {achievement.description} - + {achievement.description} diff --git a/client/components/admin/AdminStaffAdmin.tsx b/client/components/admin/AdminStaffAdmin.tsx index f24570e1..1660b37a 100644 --- a/client/components/admin/AdminStaffAdmin.tsx +++ b/client/components/admin/AdminStaffAdmin.tsx @@ -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 = { - 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() { User Management - Manage staff accounts and access + + Manage staff accounts and access +
@@ -117,7 +125,9 @@ export default function AdminStaffAdmin() { >

{user.name}

-

{user.email}

+

+ {user.email} +

{user.role} @@ -140,7 +150,9 @@ export default function AdminStaffAdmin() { Role Permissions - Define what each role can access + + Define what each role can access +
@@ -155,7 +167,10 @@ export default function AdminStaffAdmin() { {permissions.map((perm) => ( - + {perm.feature} {perm.owner ? ( @@ -198,11 +213,15 @@ export default function AdminStaffAdmin() { System Settings - Configure global system parameters + + Configure global system parameters +
- + Enabled
- + Enabled
@@ -247,7 +264,9 @@ export default function AdminStaffAdmin() { Audit Log - Track all administrative actions + + Track all administrative actions +
@@ -273,7 +292,9 @@ export default function AdminStaffAdmin() { System Maintenance - Administrative tools and utilities + + Administrative tools and utilities + - diff --git a/client/components/admin/AdminStaffChat.tsx b/client/components/admin/AdminStaffChat.tsx index 92a0056a..b3785894 100644 --- a/client/components/admin/AdminStaffChat.tsx +++ b/client/components/admin/AdminStaffChat.tsx @@ -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 */} {currentMessages.map((msg) => ( -
+
{msg.author[0]}
{msg.author} - {msg.timestamp} + + {msg.timestamp} +

{msg.content}

diff --git a/client/components/admin/AdminStaffDirectory.tsx b/client/components/admin/AdminStaffDirectory.tsx index 6ef2ed0d..14c96dc8 100644 --- a/client/components/admin/AdminStaffDirectory.tsx +++ b/client/components/admin/AdminStaffDirectory.tsx @@ -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 = { - 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" > - {isSeeding ? "Creating sample data..." : "Initialize with Sample Data"} + {isSeeding + ? "Creating sample data..." + : "Initialize with Sample Data"}

- 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.

@@ -374,7 +394,9 @@ export default function AdminStaffDirectory() { handleFormChange("full_name", e.target.value)} + onChange={(e) => + handleFormChange("full_name", e.target.value) + } placeholder="Full name" />
@@ -402,7 +424,9 @@ export default function AdminStaffDirectory() { handleFormChange("department", e.target.value)} + onChange={(e) => + handleFormChange("department", e.target.value) + } placeholder="Department name" />
@@ -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" diff --git a/client/components/admin/AdminStaffDocs.tsx b/client/components/admin/AdminStaffDocs.tsx index 53c8e07b..bde44113 100644 --- a/client/components/admin/AdminStaffDocs.tsx +++ b/client/components/admin/AdminStaffDocs.tsx @@ -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() { API Keys & Credentials
- Manage sensitive credentials with caution + + Manage sensitive credentials with caution +
diff --git a/client/components/admin/AdminStaffOperations.tsx b/client/components/admin/AdminStaffOperations.tsx index ac9f2fa8..316faf8e 100644 --- a/client/components/admin/AdminStaffOperations.tsx +++ b/client/components/admin/AdminStaffOperations.tsx @@ -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 = { - "open": , + open: , "in-review": , - "resolved": , - "pending": , - "accepted": , - "completed": , + resolved: , + pending: , + accepted: , + completed: , }; return icons[status]; }; @@ -183,7 +195,11 @@ export default function AdminStaffOperations() {
{/* Tabs */} - + Overview Moderation @@ -195,7 +211,9 @@ export default function AdminStaffOperations() { System Status - Overall platform health and activity + + Overall platform health and activity +
@@ -225,7 +243,9 @@ export default function AdminStaffOperations() { Reports & Moderation - Community reports and moderation actions + + Community reports and moderation actions + {reports.map((report) => ( @@ -263,7 +283,9 @@ export default function AdminStaffOperations() { Mentorship Program - Track mentorship requests and matches + + Track mentorship requests and matches + {mentorshipRequests.map((req) => ( @@ -293,7 +315,9 @@ export default function AdminStaffOperations() { User Management - Current user status and activity + + Current user status and activity +
diff --git a/client/components/notifications/NotificationBell.tsx b/client/components/notifications/NotificationBell.tsx index 6f9d2717..053aa1d1 100644 --- a/client/components/notifications/NotificationBell.tsx +++ b/client/components/notifications/NotificationBell.tsx @@ -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[]) : [], ); diff --git a/server/index.ts b/server/index.ts index f196b293..0607b328 100644 --- a/server/index.ts +++ b/server/index.ts @@ -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,