Extract the monolithic company-profile wizard into _components/ and _hooks/ following Next.js 15 conventions from AGENTS.typescript.md: - _components/constants.ts: wizard steps, legal forms, industries, certifications - _components/types.ts: local interfaces (ProcessingActivity, AISystem, etc.) - _components/activity-data.ts: DSGVO data categories, department/activity templates - _components/ai-system-data.ts: AI system template catalog - _components/StepBasicInfo.tsx: step 1 (company name, legal form, industry) - _components/StepBusinessModel.tsx: step 2 (B2B/B2C, offerings) - _components/StepCompanySize.tsx: step 3 (size, revenue) - _components/StepLocations.tsx: step 4 (headquarters, target markets) - _components/StepDataProtection.tsx: step 5 (DSGVO roles, DPO) - _components/StepProcessing.tsx: processing activities with category checkboxes - _components/StepAISystems.tsx: AI system inventory - _components/StepLegalFramework.tsx: certifications and contacts - _components/StepMachineBuilder.tsx: machine builder profile (step 7) - _components/ProfileSummary.tsx: completion summary view - _hooks/useCompanyProfileForm.ts: form state, auto-save, navigation logic - page.tsx: thin orchestrator (160 LOC), imports and composes sections All 16 files are under 500 LOC (largest: StepProcessing at 343). Build verified: npx next build passes cleanly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
140 lines
6.3 KiB
TypeScript
140 lines
6.3 KiB
TypeScript
import { LegalForm } from '@/lib/sdk/types'
|
|
import { OfferingType } from '@/lib/sdk/types'
|
|
|
|
// =============================================================================
|
|
// WIZARD STEPS
|
|
// =============================================================================
|
|
|
|
export const BASE_WIZARD_STEPS = [
|
|
{ id: 1, name: 'Basisinfos', description: 'Firmenname und Rechtsform' },
|
|
{ id: 2, name: 'Geschaeftsmodell', description: 'B2B, B2C und Angebote' },
|
|
{ id: 3, name: 'Firmengroesse', description: 'Mitarbeiter und Umsatz' },
|
|
{ id: 4, name: 'Standorte', description: 'Hauptsitz und Zielmaerkte' },
|
|
{ id: 5, name: 'Datenschutz', description: 'Rollen und DSB' },
|
|
{ id: 6, name: 'Zertifizierungen & Kontakte', description: 'Bestehende und angestrebte Zertifizierungen' },
|
|
]
|
|
|
|
export const MACHINE_BUILDER_STEP = { id: 7, name: 'Produkt & Maschine', description: 'Software, KI und CE in Ihrem Produkt' }
|
|
|
|
// =============================================================================
|
|
// INDUSTRIES
|
|
// =============================================================================
|
|
|
|
export const INDUSTRIES = [
|
|
'Technologie / IT',
|
|
'IT Dienstleistungen',
|
|
'E-Commerce / Handel',
|
|
'Finanzdienstleistungen',
|
|
'Versicherungen',
|
|
'Gesundheitswesen',
|
|
'Pharma',
|
|
'Bildung',
|
|
'Beratung / Consulting',
|
|
'Marketing / Agentur',
|
|
'Produktion / Industrie',
|
|
'Logistik / Transport',
|
|
'Immobilien',
|
|
'Bau',
|
|
'Energie',
|
|
'Automobil',
|
|
'Luft- und Raumfahrt',
|
|
'Maschinenbau',
|
|
'Anlagenbau',
|
|
'Automatisierung',
|
|
'Robotik',
|
|
'Messtechnik',
|
|
'Agrar',
|
|
'Chemie',
|
|
'Minen / Bergbau',
|
|
'Telekommunikation',
|
|
'Medien / Verlage',
|
|
'Gastronomie / Hotellerie',
|
|
'Recht / Kanzlei',
|
|
'Oeffentlicher Dienst',
|
|
'Sonstige',
|
|
]
|
|
|
|
const MACHINE_BUILDER_INDUSTRIES = [
|
|
'Maschinenbau',
|
|
'Anlagenbau',
|
|
'Automatisierung',
|
|
'Robotik',
|
|
'Messtechnik',
|
|
]
|
|
|
|
export const isMachineBuilderIndustry = (industry: string | string[]) => {
|
|
const industries = Array.isArray(industry) ? industry : [industry]
|
|
return industries.some(i => MACHINE_BUILDER_INDUSTRIES.includes(i))
|
|
}
|
|
|
|
export function getWizardSteps(industry: string | string[]) {
|
|
if (isMachineBuilderIndustry(industry)) {
|
|
return [...BASE_WIZARD_STEPS, MACHINE_BUILDER_STEP]
|
|
}
|
|
return BASE_WIZARD_STEPS
|
|
}
|
|
|
|
// =============================================================================
|
|
// LEGAL FORMS
|
|
// =============================================================================
|
|
|
|
export const LEGAL_FORM_LABELS: Record<LegalForm, string> = {
|
|
einzelunternehmen: 'Einzelunternehmen',
|
|
gbr: 'GbR',
|
|
ohg: 'OHG',
|
|
kg: 'KG',
|
|
gmbh: 'GmbH',
|
|
ug: 'UG (haftungsbeschränkt)',
|
|
ag: 'AG',
|
|
gmbh_co_kg: 'GmbH & Co. KG',
|
|
ev: 'e.V. (Verein)',
|
|
stiftung: 'Stiftung',
|
|
other: 'Sonstige',
|
|
}
|
|
|
|
// =============================================================================
|
|
// STEP EXPLANATIONS
|
|
// =============================================================================
|
|
|
|
export const STEP_EXPLANATIONS: Record<number, string> = {
|
|
1: 'Rechtsform und Gründungsjahr bestimmen, welche Meldepflichten und Schwellenwerte für Ihr Unternehmen gelten (z.B. NIS2, AI Act).',
|
|
2: 'Ihr Geschäftsmodell und Ihre Angebote bestimmen, welche DSGVO-Pflichten greifen: B2C erfordert z.B. strengere Einwilligungsregeln, Webshops brauchen Cookie-Banner und Datenschutzerklärungen, SaaS-Angebote eine Auftragsverarbeitung.',
|
|
3: 'Die Unternehmensgröße bestimmt, ob Sie einen DSB benennen müssen (ab 20 MA), ob NIS2-Pflichten greifen und welche Audit-Anforderungen gelten.',
|
|
4: 'Standorte und Zielmärkte bestimmen, welche nationalen Datenschutzgesetze zusätzlich zur DSGVO greifen (z.B. BDSG, DSG-AT, UK GDPR, CCPA).',
|
|
5: 'Ob Sie Verantwortlicher oder Auftragsverarbeiter sind, bestimmt Ihre DSGVO-Pflichten grundlegend.',
|
|
6: 'Regulierungsrahmen und Prüfzyklen definieren, welche Compliance-Module für Sie aktiviert werden und in welchem Rhythmus Audits stattfinden.',
|
|
7: 'Als Maschinenbauer gelten zusätzliche Anforderungen: CE-Kennzeichnung, Maschinenverordnung, Produktsicherheit und ggf. Hochrisiko-KI im Sinne des AI Act.',
|
|
}
|
|
|
|
// =============================================================================
|
|
// OFFERING URL CONFIG
|
|
// =============================================================================
|
|
|
|
export const OFFERING_URL_CONFIG: Partial<Record<OfferingType, { label: string; placeholder: string; hint: string }>> = {
|
|
website: { label: 'Website-Domain', placeholder: 'https://www.beispiel.de', hint: 'Ihre Unternehmenswebsite' },
|
|
webshop: { label: 'Online-Shop URL', placeholder: 'https://shop.beispiel.de', hint: 'URL zu Ihrem Online-Shop' },
|
|
app_mobile: { label: 'App-Store Links', placeholder: 'https://apps.apple.com/... oder https://play.google.com/...', hint: 'Apple App Store und/oder Google Play Store Link' },
|
|
software_saas: { label: 'SaaS-Portal URL', placeholder: 'https://app.beispiel.de', hint: 'Login-/Registrierungsseite Ihres Kundenportals' },
|
|
app_web: { label: 'Web-App URL', placeholder: 'https://app.beispiel.de', hint: 'URL zu Ihrer Web-Anwendung' },
|
|
}
|
|
|
|
// =============================================================================
|
|
// CERTIFICATIONS
|
|
// =============================================================================
|
|
|
|
export const CERTIFICATIONS = [
|
|
{ id: 'iso27001', label: 'ISO 27001', desc: 'Informationssicherheits-Managementsystem' },
|
|
{ id: 'iso27701', label: 'ISO 27701', desc: 'Datenschutz-Managementsystem' },
|
|
{ id: 'iso9001', label: 'ISO 9001', desc: 'Qualitaetsmanagement' },
|
|
{ id: 'iso14001', label: 'ISO 14001', desc: 'Umweltmanagement' },
|
|
{ id: 'iso22301', label: 'ISO 22301', desc: 'Business Continuity Management' },
|
|
{ id: 'iso42001', label: 'ISO 42001', desc: 'KI-Managementsystem' },
|
|
{ id: 'tisax', label: 'TISAX', desc: 'Trusted Information Security Assessment Exchange (Automotive)' },
|
|
{ id: 'soc2', label: 'SOC 2', desc: 'Service Organization Controls (Typ I/II)' },
|
|
{ id: 'c5', label: 'C5', desc: 'Cloud Computing Compliance Criteria Catalogue (BSI)' },
|
|
{ id: 'bsi_grundschutz', label: 'BSI IT-Grundschutz', desc: 'IT-Grundschutz-Zertifikat oder Testat' },
|
|
{ id: 'pci_dss', label: 'PCI DSS', desc: 'Payment Card Industry Data Security Standard' },
|
|
{ id: 'hipaa', label: 'HIPAA', desc: 'Health Insurance Portability and Accountability Act' },
|
|
{ id: 'other', label: 'Sonstige', desc: 'Andere Zertifizierungen' },
|
|
]
|