ultisuite-client/components/admin/settings/sections/admin-org-llm-providers-panel.tsx
R3D347HR4Y 8f81d7aba1
Some checks are pending
E2E / Playwright e2e (push) Waiting to run
feat(admin-settings): refactor admin settings components for improved usability and consistency
- Replaced legacy components with new `SettingsCard`, `SettingsField`, and `SettingsToggleRow` for a unified design.
- Enhanced `AdminListControls` to support compact mode and improved pagination controls.
- Updated various sections including `AiAssistantSection`, `AuthenticationSection`, and `DriveMountOAuthSection` to utilize new components, streamlining the settings interface.
- Improved accessibility and user experience across admin settings with clearer labels and hints.
- Deprecated old components while maintaining backward compatibility for existing admin sections.
2026-06-15 11:10:17 +02:00

36 lines
1.1 KiB
TypeScript

"use client"
import type { OrgLLMSettings } from "@/lib/admin-settings/org-settings-types"
import { SettingsCard, SettingsToggleRow } from "@/components/settings/settings-kit"
export function AdminOrgLlmPolicyCard({
draft,
setDraft,
}: {
draft: OrgLLMSettings
setDraft: React.Dispatch<React.SetStateAction<OrgLLMSettings>>
}) {
return (
<SettingsCard
title="Politique LLM"
description="Contrôle l'accès aux fournisseurs IA pour les utilisateurs de l'organisation."
>
<SettingsToggleRow
title="Imposer les fournisseurs org."
description="Les utilisateurs ne peuvent pas utiliser d'autres clés API."
checked={draft.enforce_org_providers}
onCheckedChange={(enforce_org_providers) =>
setDraft((p) => ({ ...p, enforce_org_providers }))
}
/>
<SettingsToggleRow
title="Autoriser surcharge utilisateur"
checked={draft.allow_user_override}
onCheckedChange={(allow_user_override) =>
setDraft((p) => ({ ...p, allow_user_override }))
}
/>
</SettingsCard>
)
}