refactor: remove 473 lines of dead code across 5 SDK modules

- obligations: unused vendors state/fetch, unreachable filter==='ai' path
- tom: unused vendorControlsLoading state, unused bulkUpdateTOMs import
- loeschfristen: unused BASELINE_TEMPLATES imports, sdk hook, managingLegalHolds state
- vvt: unused apiGetCompleteness/apiGetLibrary, 7 unused VVTLib* interfaces
- vendor-compliance: 11 unused context methods, 6 unused selector hooks, ContractUploadData type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-20 06:57:01 +01:00
parent 9b0f25c105
commit 24f02b52ed
8 changed files with 2 additions and 473 deletions

View File

@@ -588,17 +588,6 @@ export default function ObligationsPage() {
const [profiling, setProfiling] = useState(false)
const [applicableRegs, setApplicableRegs] = useState<ApplicableRegulation[]>([])
const [activeTab, setActiveTab] = useState<Tab>('uebersicht')
const [vendors, setVendors] = useState<Array<{id: string, name: string, role: string}>>([])
useEffect(() => {
fetch('/api/sdk/v1/vendor-compliance/vendors?limit=500')
.then(r => r.ok ? r.json() : null)
.then(data => {
const items = data?.data?.items || []
setVendors(items.map((v: any) => ({ id: v.id, name: v.name, role: v.role })))
})
.catch(() => {})
}, [])
// Compliance check result — auto-computed when obligations change
const complianceResult = useMemo<ObligationComplianceCheckResult | null>(() => {
@@ -777,9 +766,6 @@ export default function ObligationsPage() {
const stepInfo = STEP_EXPLANATIONS['obligations']
const filteredObligations = obligations.filter(o => {
if (filter === 'ai') {
if (!o.source.toLowerCase().includes('ai')) return false
}
if (regulationFilter !== 'all') {
const src = o.source?.toLowerCase() || ''
const key = regulationFilter.toLowerCase()