ultisuite-client/components/admin/settings/sections/admin-org-llm-providers-panel.tsx
R3D347HR4Y 9e9fd208ad
Some checks are pending
E2E / Playwright e2e (push) Waiting to run
feat(admin-settings): enhance admin settings with new components and layout improvements
- Introduced new components for managing admin settings, including AdminListControls, AdminSettingsCard, and TechBrandSelectLabel.
- Implemented dynamic loading for admin settings sections to optimize performance.
- Enhanced the layout of various admin settings sections for better user experience.
- Updated the AiAssistantSection to include LLM provider management and improved model selection.
- Refactored authentication settings to streamline configuration and improve accessibility.
2026-06-15 00:22:20 +02:00

52 lines
1.7 KiB
TypeScript

"use client"
import type { OrgLLMSettings } from "@/lib/admin-settings/org-settings-types"
import { Switch } from "@/components/ui/switch"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
export function AdminOrgLlmPolicyCard({
draft,
setDraft,
}: {
draft: OrgLLMSettings
setDraft: React.Dispatch<React.SetStateAction<OrgLLMSettings>>
}) {
return (
<Card>
<CardHeader className="pb-3">
<CardTitle className="text-sm font-medium">Politique LLM</CardTitle>
<CardDescription>
Contrôle l&apos;accès aux fournisseurs IA pour les utilisateurs de l&apos;organisation.
</CardDescription>
</CardHeader>
<CardContent className="space-y-3">
<label className="flex items-center justify-between gap-4">
<div>
<p className="text-sm font-medium">Imposer les fournisseurs org.</p>
<p className="text-xs text-muted-foreground">
Les utilisateurs ne peuvent pas utiliser d&apos;autres clés API.
</p>
</div>
<Switch
checked={draft.enforce_org_providers}
onCheckedChange={(enforce_org_providers) =>
setDraft((p) => ({ ...p, enforce_org_providers }))
}
/>
</label>
<label className="flex items-center justify-between gap-4">
<div>
<p className="text-sm font-medium">Autoriser surcharge utilisateur</p>
</div>
<Switch
checked={draft.allow_user_override}
onCheckedChange={(allow_user_override) =>
setDraft((p) => ({ ...p, allow_user_override }))
}
/>
</label>
</CardContent>
</Card>
)
}