{isSuperAdmin && (
AI Configuration
Configure AI-powered features like smart jury assignment
)}
Platform Branding
Customize the look and feel of your platform
{isSuperAdmin && (
Email Configuration
Configure email settings for notifications and magic links
)}
Notification Email Settings
Configure which notification types should also send email notifications
{isSuperAdmin && (
File Storage
Configure file upload limits and allowed types
)}
{isSuperAdmin && (
Security Settings
Configure security and access control settings
)}
Default Settings
Configure default values for the platform
Platform Features
Configure Learning Hub, support contact, and other platform features
Digest Configuration
Configure automated digest emails sent to users
Analytics & Reports
Configure observer dashboard visibility and PDF report settings
Audit & Security
Configure audit log retention and anomaly detection
{isSuperAdmin && (
WhatsApp Notifications
Configure WhatsApp messaging for notifications
)}
{/* end content area */}
{/* end lg:flex */}
>
)
}
export { SettingsSkeleton }
// Inline settings sections for new tabs
import { useState } from 'react'
import { Switch } from '@/components/ui/switch'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { Checkbox } from '@/components/ui/checkbox'
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/components/ui/select'
import { Loader2 } from 'lucide-react'
import { toast } from 'sonner'
function useSettingsMutation() {
const utils = trpc.useUtils()
return trpc.settings.update.useMutation({
onSuccess: () => {
utils.settings.invalidate()
toast.success('Setting updated')
},
onError: (e) => toast.error(e.message),
})
}
function SettingToggle({
label,
description,
settingKey,
value,
}: {
label: string
description?: string
settingKey: string
value: string
}) {
const mutation = useSettingsMutation()
const isChecked = value === 'true'
return (