refactor(admin): split sso page.tsx into colocated components
Extract types, constants, helpers, and UI pieces (shared LoadingSkeleton/ EmptyState/StatusBadge/CopyButton, SSOConfigFormModal, DeleteConfirmModal, ConnectionTestPanel, SSOConfigCard, SSOUsersTable, SSOInfoSection) into _components/ and _types.ts to bring page.tsx from 1482 LOC to 339 LOC (under the 500 hard cap). Behavior preserved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
28
admin-compliance/app/sdk/sso/_components/constants.ts
Normal file
28
admin-compliance/app/sdk/sso/_components/constants.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { SSOFormData } from '../_types'
|
||||
|
||||
export const FALLBACK_TENANT_ID = '00000000-0000-0000-0000-000000000001'
|
||||
export const FALLBACK_USER_ID = '00000000-0000-0000-0000-000000000001'
|
||||
export const API_BASE = '/api/sdk/v1/sso'
|
||||
|
||||
export const DEFAULT_SCOPES = 'openid,email,profile'
|
||||
|
||||
export const AVAILABLE_ROLES = [
|
||||
{ value: 'user', label: 'Benutzer' },
|
||||
{ value: 'admin', label: 'Administrator' },
|
||||
{ value: 'data_protection_officer', label: 'Datenschutzbeauftragter' },
|
||||
{ value: 'auditor', label: 'Auditor' },
|
||||
{ value: 'viewer', label: 'Nur Lesen' },
|
||||
]
|
||||
|
||||
export const EMPTY_FORM: SSOFormData = {
|
||||
name: '',
|
||||
provider_type: 'oidc',
|
||||
issuer_url: '',
|
||||
client_id: '',
|
||||
client_secret: '',
|
||||
redirect_uri: '',
|
||||
scopes: DEFAULT_SCOPES,
|
||||
auto_provision: true,
|
||||
default_role: 'user',
|
||||
role_mappings: [],
|
||||
}
|
||||
Reference in New Issue
Block a user