Some checks failed
Tests / Go Tests (push) Has been cancelled
Tests / Python Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / Go Lint (push) Has been cancelled
Tests / Python Lint (push) Has been cancelled
Tests / Security Scan (push) Has been cancelled
Tests / All Checks Passed (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Go Security Scan (push) Has been cancelled
Security Scanning / Python Security Scan (push) Has been cancelled
Security Scanning / Node.js Security Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
CI/CD Pipeline / Go Tests (push) Has been cancelled
CI/CD Pipeline / Python Tests (push) Has been cancelled
CI/CD Pipeline / Website Tests (push) Has been cancelled
CI/CD Pipeline / Linting (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build & Push (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / CI Summary (push) Has been cancelled
ci/woodpecker/manual/build-ci-image Pipeline was successful
ci/woodpecker/manual/main Pipeline failed
All services: admin-v2, studio-v2, website, ai-compliance-sdk, consent-service, klausur-service, voice-service, and infrastructure. Large PDFs and compiled binaries excluded via .gitignore.
129 lines
4.4 KiB
TypeScript
129 lines
4.4 KiB
TypeScript
'use client'
|
|
|
|
import React from 'react'
|
|
import { useRouter } from 'next/navigation'
|
|
import { useTOMGenerator } from '@/lib/sdk/tom-generator'
|
|
import { DataCategoriesStep } from '@/components/sdk/tom-generator/steps/DataCategoriesStep'
|
|
import { TOM_GENERATOR_STEPS } from '@/lib/sdk/tom-generator/types'
|
|
|
|
/**
|
|
* Step 2: Data Categories
|
|
*
|
|
* Collects data processing information including:
|
|
* - Data categories (with warnings for special categories)
|
|
* - Data subjects (with warnings for minors)
|
|
* - Data volume
|
|
* - Third country transfers
|
|
*/
|
|
export default function DataPage() {
|
|
const router = useRouter()
|
|
const { state, goToNextStep, goToPreviousStep } = useTOMGenerator()
|
|
|
|
const currentStepIndex = TOM_GENERATOR_STEPS.findIndex((s) => s.id === 'data-categories')
|
|
const prevStep = TOM_GENERATOR_STEPS[currentStepIndex - 1]
|
|
const nextStep = TOM_GENERATOR_STEPS[currentStepIndex + 1]
|
|
|
|
const handleNext = () => {
|
|
goToNextStep()
|
|
if (nextStep) {
|
|
router.push(nextStep.url)
|
|
}
|
|
}
|
|
|
|
const handleBack = () => {
|
|
goToPreviousStep()
|
|
if (prevStep) {
|
|
router.push(prevStep.url)
|
|
}
|
|
}
|
|
|
|
return (
|
|
<div className="max-w-4xl mx-auto px-4 py-8">
|
|
{/* Step Header */}
|
|
<div className="mb-8">
|
|
<div className="flex items-center gap-2 text-sm text-gray-500 mb-2">
|
|
<span>Schritt 2 von 6</span>
|
|
<span className="text-gray-300">|</span>
|
|
<span>Datenkategorien</span>
|
|
</div>
|
|
<h1 className="text-2xl font-bold text-gray-900">
|
|
Datenkategorien & Betroffene
|
|
</h1>
|
|
<p className="mt-2 text-gray-600">
|
|
Welche Arten von personenbezogenen Daten verarbeiten Sie?
|
|
Die Sensitivitaet der Daten bestimmt die erforderlichen Schutzmassnahmen.
|
|
</p>
|
|
</div>
|
|
|
|
{/* Progress Indicator */}
|
|
<div className="mb-8">
|
|
<div className="flex items-center gap-2">
|
|
{TOM_GENERATOR_STEPS.map((step, index) => {
|
|
const stepState = state.steps.find((s) => s.id === step.id)
|
|
const isCompleted = stepState?.completed
|
|
const isCurrent = state.currentStep === step.id
|
|
|
|
return (
|
|
<React.Fragment key={step.id}>
|
|
<button
|
|
onClick={() => router.push(step.url)}
|
|
className={`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all ${
|
|
isCompleted
|
|
? 'bg-green-500 text-white'
|
|
: isCurrent
|
|
? 'bg-blue-500 text-white'
|
|
: 'bg-gray-200 text-gray-500 hover:bg-gray-300'
|
|
}`}
|
|
title={step.name}
|
|
>
|
|
{isCompleted ? (
|
|
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
|
|
</svg>
|
|
) : (
|
|
index + 1
|
|
)}
|
|
</button>
|
|
{index < TOM_GENERATOR_STEPS.length - 1 && (
|
|
<div
|
|
className={`flex-1 h-1 rounded ${
|
|
isCompleted ? 'bg-green-500' : 'bg-gray-200'
|
|
}`}
|
|
/>
|
|
)}
|
|
</React.Fragment>
|
|
)
|
|
})}
|
|
</div>
|
|
</div>
|
|
|
|
{/* Step Content */}
|
|
<div className="bg-white rounded-xl border border-gray-200 p-6">
|
|
<DataCategoriesStep />
|
|
</div>
|
|
|
|
{/* Navigation */}
|
|
<div className="flex justify-between mt-6">
|
|
<button
|
|
onClick={handleBack}
|
|
className="px-4 py-2 text-gray-600 hover:text-gray-900 transition-colors flex items-center gap-2"
|
|
>
|
|
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
|
|
</svg>
|
|
Zurueck
|
|
</button>
|
|
<button
|
|
onClick={handleNext}
|
|
className="px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center gap-2"
|
|
>
|
|
Weiter
|
|
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|