feat(company-profile): Branchen-Erweiterung, Multi-Select & Zertifizierungen
Multi-Branche-Auswahl im CompanyProfile, erweiterte allowed-facts fuer Drafting Engine, Demo-Daten und TOM-Generator Anpassungen. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,12 +34,12 @@ const BASE_WIZARD_STEPS = [
|
|||||||
{ id: 3, name: 'Firmengroesse', description: 'Mitarbeiter und Umsatz' },
|
{ id: 3, name: 'Firmengroesse', description: 'Mitarbeiter und Umsatz' },
|
||||||
{ id: 4, name: 'Standorte', description: 'Hauptsitz und Zielmaerkte' },
|
{ id: 4, name: 'Standorte', description: 'Hauptsitz und Zielmaerkte' },
|
||||||
{ id: 5, name: 'Datenschutz', description: 'Rollen und DSB' },
|
{ id: 5, name: 'Datenschutz', description: 'Rollen und DSB' },
|
||||||
{ id: 6, name: 'Rechtlicher Rahmen', description: 'Regulierungen und Prüfzyklen' },
|
{ id: 6, name: 'Zertifizierungen & Kontakte', description: 'Bestehende und angestrebte Zertifizierungen' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const MACHINE_BUILDER_STEP = { id: 7, name: 'Produkt & Maschine', description: 'Software, KI und CE in Ihrem Produkt' }
|
const MACHINE_BUILDER_STEP = { id: 7, name: 'Produkt & Maschine', description: 'Software, KI und CE in Ihrem Produkt' }
|
||||||
|
|
||||||
function getWizardSteps(industry: string) {
|
function getWizardSteps(industry: string | string[]) {
|
||||||
if (isMachineBuilderIndustry(industry)) {
|
if (isMachineBuilderIndustry(industry)) {
|
||||||
return [...BASE_WIZARD_STEPS, MACHINE_BUILDER_STEP]
|
return [...BASE_WIZARD_STEPS, MACHINE_BUILDER_STEP]
|
||||||
}
|
}
|
||||||
@@ -73,20 +73,35 @@ const LEGAL_FORM_LABELS: Record<LegalForm, string> = {
|
|||||||
|
|
||||||
const INDUSTRIES = [
|
const INDUSTRIES = [
|
||||||
'Technologie / IT',
|
'Technologie / IT',
|
||||||
|
'IT Dienstleistungen',
|
||||||
'E-Commerce / Handel',
|
'E-Commerce / Handel',
|
||||||
'Finanzdienstleistungen',
|
'Finanzdienstleistungen',
|
||||||
|
'Versicherungen',
|
||||||
'Gesundheitswesen',
|
'Gesundheitswesen',
|
||||||
|
'Pharma',
|
||||||
'Bildung',
|
'Bildung',
|
||||||
'Beratung / Consulting',
|
'Beratung / Consulting',
|
||||||
'Marketing / Agentur',
|
'Marketing / Agentur',
|
||||||
'Produktion / Industrie',
|
'Produktion / Industrie',
|
||||||
'Logistik / Transport',
|
'Logistik / Transport',
|
||||||
'Immobilien',
|
'Immobilien',
|
||||||
|
'Bau',
|
||||||
|
'Energie',
|
||||||
|
'Automobil',
|
||||||
|
'Luft- und Raumfahrt',
|
||||||
'Maschinenbau',
|
'Maschinenbau',
|
||||||
'Anlagenbau',
|
'Anlagenbau',
|
||||||
'Automatisierung',
|
'Automatisierung',
|
||||||
'Robotik',
|
'Robotik',
|
||||||
'Messtechnik',
|
'Messtechnik',
|
||||||
|
'Agrar',
|
||||||
|
'Chemie',
|
||||||
|
'Minen / Bergbau',
|
||||||
|
'Telekommunikation',
|
||||||
|
'Medien / Verlage',
|
||||||
|
'Gastronomie / Hotellerie',
|
||||||
|
'Recht / Kanzlei',
|
||||||
|
'Oeffentlicher Dienst',
|
||||||
'Sonstige',
|
'Sonstige',
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -98,8 +113,10 @@ const MACHINE_BUILDER_INDUSTRIES = [
|
|||||||
'Messtechnik',
|
'Messtechnik',
|
||||||
]
|
]
|
||||||
|
|
||||||
const isMachineBuilderIndustry = (industry: string) =>
|
const isMachineBuilderIndustry = (industry: string | string[]) => {
|
||||||
MACHINE_BUILDER_INDUSTRIES.includes(industry)
|
const industries = Array.isArray(industry) ? industry : [industry]
|
||||||
|
return industries.some(i => MACHINE_BUILDER_INDUSTRIES.includes(i))
|
||||||
|
}
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// STEP COMPONENTS
|
// STEP COMPONENTS
|
||||||
@@ -146,23 +163,44 @@ function StepBasicInfo({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-3">Branche</label>
|
<label className="block text-sm font-medium text-gray-700 mb-1">Branche(n)</label>
|
||||||
|
<p className="text-sm text-gray-500 mb-3">Mehrfachauswahl moeglich</p>
|
||||||
<div className="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
<div className="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
||||||
{INDUSTRIES.map(industry => (
|
{INDUSTRIES.map(ind => {
|
||||||
|
const selected = (data.industry || []).includes(ind)
|
||||||
|
return (
|
||||||
<button
|
<button
|
||||||
key={industry}
|
key={ind}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => onChange({ industry })}
|
onClick={() => {
|
||||||
|
const current = data.industry || []
|
||||||
|
const updated = selected
|
||||||
|
? current.filter(i => i !== ind)
|
||||||
|
: [...current, ind]
|
||||||
|
onChange({ industry: updated })
|
||||||
|
}}
|
||||||
className={`p-3 rounded-lg border-2 text-sm text-left transition-all ${
|
className={`p-3 rounded-lg border-2 text-sm text-left transition-all ${
|
||||||
data.industry === industry
|
selected
|
||||||
? 'border-purple-500 bg-purple-50 text-purple-700 font-medium'
|
? 'border-purple-500 bg-purple-50 text-purple-700 font-medium'
|
||||||
: 'border-gray-200 hover:border-purple-300 text-gray-700'
|
: 'border-gray-200 hover:border-purple-300 text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{industry}
|
{ind}
|
||||||
</button>
|
</button>
|
||||||
))}
|
)
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
{(data.industry || []).includes('Sonstige') && (
|
||||||
|
<div className="mt-3">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
value={data.industryOther || ''}
|
||||||
|
onChange={e => onChange({ industryOther: e.target.value })}
|
||||||
|
placeholder="Ihre Branche eingeben..."
|
||||||
|
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -843,16 +881,25 @@ const INDUSTRY_DEPARTMENTS: Record<string, ActivityDepartment[]> = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compute which departments to show based on company context
|
// Compute which departments to show based on company context
|
||||||
function getRelevantDepartments(industry: string, businessModel: string | undefined, companySize: string | undefined): ActivityDepartment[] {
|
function getRelevantDepartments(industry: string | string[], businessModel: string | undefined, companySize: string | undefined): ActivityDepartment[] {
|
||||||
const departments: ActivityDepartment[] = [...UNIVERSAL_DEPARTMENTS]
|
const departments: ActivityDepartment[] = [...UNIVERSAL_DEPARTMENTS]
|
||||||
|
|
||||||
// Always show optional departments — user can choose
|
// Always show optional departments — user can choose
|
||||||
departments.push(...OPTIONAL_DEPARTMENTS)
|
departments.push(...OPTIONAL_DEPARTMENTS)
|
||||||
|
|
||||||
// Add industry-specific departments
|
// Add industry-specific departments (support multi-select)
|
||||||
const industryDepts = INDUSTRY_DEPARTMENTS[industry]
|
const industries = Array.isArray(industry) ? industry : [industry]
|
||||||
|
const addedIds = new Set<string>()
|
||||||
|
for (const ind of industries) {
|
||||||
|
const industryDepts = INDUSTRY_DEPARTMENTS[ind]
|
||||||
if (industryDepts) {
|
if (industryDepts) {
|
||||||
departments.push(...industryDepts)
|
for (const dept of industryDepts) {
|
||||||
|
if (!addedIds.has(dept.id)) {
|
||||||
|
addedIds.add(dept.id)
|
||||||
|
departments.push(dept)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return departments
|
return departments
|
||||||
@@ -898,7 +945,7 @@ function StepProcessing({
|
|||||||
onChange: (updates: Record<string, unknown>) => void
|
onChange: (updates: Record<string, unknown>) => void
|
||||||
}) {
|
}) {
|
||||||
const activities: ProcessingActivity[] = (data as any).processingSystems || []
|
const activities: ProcessingActivity[] = (data as any).processingSystems || []
|
||||||
const industry = data.industry || ''
|
const industry = data.industry || []
|
||||||
const [expandedActivity, setExpandedActivity] = useState<string | null>(null)
|
const [expandedActivity, setExpandedActivity] = useState<string | null>(null)
|
||||||
const [collapsedDepts, setCollapsedDepts] = useState<Set<string>>(new Set())
|
const [collapsedDepts, setCollapsedDepts] = useState<Set<string>>(new Set())
|
||||||
const [showExtraCategories, setShowExtraCategories] = useState<Set<string>>(new Set())
|
const [showExtraCategories, setShowExtraCategories] = useState<Set<string>>(new Set())
|
||||||
@@ -1645,14 +1692,68 @@ function StepAISystems({
|
|||||||
// STEP 6: RECHTLICHER RAHMEN (was Step 8, renumbered)
|
// STEP 6: RECHTLICHER RAHMEN (was Step 8, renumbered)
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
|
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: 'ce_marking', label: 'CE-Kennzeichnung', desc: 'EU-Konformitaetskennzeichnung fuer Produkte' },
|
||||||
|
{ id: 'other', label: 'Sonstige', desc: 'Andere Zertifizierungen' },
|
||||||
|
]
|
||||||
|
|
||||||
|
interface CertificationEntry {
|
||||||
|
certId: string
|
||||||
|
certifier?: string
|
||||||
|
lastDate?: string
|
||||||
|
customName?: string
|
||||||
|
}
|
||||||
|
|
||||||
function StepLegalFramework({
|
function StepLegalFramework({
|
||||||
data,
|
data,
|
||||||
onChange,
|
onChange,
|
||||||
}: {
|
}: {
|
||||||
data: Partial<CompanyProfile> & { subjectToNis2?: boolean; subjectToAiAct?: boolean; subjectToIso27001?: boolean; supervisoryAuthority?: string; reviewCycleMonths?: number; technicalContacts?: { name: string; role: string; email: string }[] }
|
data: Partial<CompanyProfile>
|
||||||
onChange: (updates: Record<string, unknown>) => void
|
onChange: (updates: Record<string, unknown>) => void
|
||||||
}) {
|
}) {
|
||||||
const contacts = (data as any).technicalContacts || []
|
const contacts = (data as any).technicalContacts || []
|
||||||
|
const existingCerts: CertificationEntry[] = (data as any).existingCertifications || []
|
||||||
|
const targetCerts: string[] = (data as any).targetCertifications || []
|
||||||
|
const targetCertOther: string = (data as any).targetCertificationOther || ''
|
||||||
|
|
||||||
|
// Toggle existing certification
|
||||||
|
const toggleExistingCert = (certId: string) => {
|
||||||
|
const exists = existingCerts.find((c: CertificationEntry) => c.certId === certId)
|
||||||
|
if (exists) {
|
||||||
|
onChange({ existingCertifications: existingCerts.filter((c: CertificationEntry) => c.certId !== certId) })
|
||||||
|
} else {
|
||||||
|
onChange({ existingCertifications: [...existingCerts, { certId }] })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateExistingCert = (certId: string, updates: Partial<CertificationEntry>) => {
|
||||||
|
onChange({
|
||||||
|
existingCertifications: existingCerts.map((c: CertificationEntry) =>
|
||||||
|
c.certId === certId ? { ...c, ...updates } : c
|
||||||
|
),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggle target certification
|
||||||
|
const toggleTargetCert = (certId: string) => {
|
||||||
|
if (targetCerts.includes(certId)) {
|
||||||
|
onChange({ targetCertifications: targetCerts.filter((c: string) => c !== certId) })
|
||||||
|
} else {
|
||||||
|
onChange({ targetCertifications: [...targetCerts, certId] })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const addContact = () => {
|
const addContact = () => {
|
||||||
onChange({ technicalContacts: [...contacts, { name: '', role: '', email: '' }] })
|
onChange({ technicalContacts: [...contacts, { name: '', role: '', email: '' }] })
|
||||||
@@ -1668,77 +1769,144 @@ function StepLegalFramework({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-8">
|
<div className="space-y-8">
|
||||||
{/* Regulatory Flags */}
|
{/* Bestehende Zertifizierungen */}
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-sm font-medium text-gray-700 mb-4">Regulatorischer Rahmen</h3>
|
<h3 className="text-sm font-medium text-gray-700 mb-1">Bestehende Zertifizierungen</h3>
|
||||||
<div className="space-y-3">
|
<p className="text-sm text-gray-500 mb-3">Ueber welche Zertifizierungen verfuegt Ihr Unternehmen aktuell? Mehrfachauswahl moeglich.</p>
|
||||||
{[
|
<div className="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
||||||
{ key: 'subjectToNis2', label: 'NIS2-Richtlinie', desc: 'Ihr Unternehmen fällt unter die NIS2-Richtlinie (Netzwerk- und Informationssicherheit)' },
|
{CERTIFICATIONS.map(cert => {
|
||||||
{ key: 'subjectToAiAct', label: 'EU AI Act', desc: 'Ihr Unternehmen setzt KI-Systeme ein, die unter den AI Act fallen' },
|
const selected = existingCerts.some((c: CertificationEntry) => c.certId === cert.id)
|
||||||
{ key: 'subjectToIso27001', label: 'ISO 27001', desc: 'Ihr Unternehmen strebt ISO 27001 Zertifizierung an oder ist bereits zertifiziert' },
|
return (
|
||||||
].map(item => (
|
<button
|
||||||
<label
|
key={cert.id}
|
||||||
key={item.key}
|
type="button"
|
||||||
className={`flex items-start gap-4 p-4 rounded-xl border-2 cursor-pointer transition-all ${
|
onClick={() => toggleExistingCert(cert.id)}
|
||||||
(data as any)[item.key] ? 'border-purple-500 bg-purple-50' : 'border-gray-200 hover:border-purple-300'
|
className={`p-3 rounded-lg border-2 text-left transition-all ${
|
||||||
|
selected
|
||||||
|
? 'border-purple-500 bg-purple-50 text-purple-700'
|
||||||
|
: 'border-gray-200 hover:border-purple-300 text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<input
|
<div className="font-medium text-sm">{cert.label}</div>
|
||||||
type="checkbox"
|
<div className="text-xs text-gray-500 mt-0.5">{cert.desc}</div>
|
||||||
checked={(data as any)[item.key] ?? false}
|
</button>
|
||||||
onChange={e => onChange({ [item.key]: e.target.checked })}
|
)
|
||||||
className="mt-1 w-5 h-5 text-purple-600 rounded focus:ring-purple-500"
|
})}
|
||||||
/>
|
|
||||||
<div>
|
|
||||||
<div className="font-medium text-gray-900">{item.label}</div>
|
|
||||||
<div className="text-sm text-gray-500">{item.desc}</div>
|
|
||||||
</div>
|
|
||||||
</label>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Supervisory Authority & Review Cycle */}
|
{/* Details fuer ausgewaehlte Zertifizierungen */}
|
||||||
<div className="grid grid-cols-2 gap-6">
|
{existingCerts.length > 0 && (
|
||||||
<div>
|
<div className="mt-4 space-y-3">
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-2">Aufsichtsbehörde</label>
|
{existingCerts.map((entry: CertificationEntry) => {
|
||||||
<select
|
const cert = CERTIFICATIONS.find(c => c.id === entry.certId)
|
||||||
value={(data as any).supervisoryAuthority || ''}
|
const label = cert?.label || entry.certId
|
||||||
onChange={e => onChange({ supervisoryAuthority: e.target.value })}
|
return (
|
||||||
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
<div key={entry.certId} className="p-4 bg-purple-50 border border-purple-200 rounded-lg">
|
||||||
>
|
<div className="font-medium text-sm text-purple-800 mb-2">
|
||||||
<option value="">Bitte wählen...</option>
|
{entry.certId === 'other' ? 'Sonstige Zertifizierung' : label}
|
||||||
<option value="LfDI BW">LfDI Baden-Württemberg</option>
|
|
||||||
<option value="BayLDA">BayLDA Bayern</option>
|
|
||||||
<option value="BlnBDI">BlnBDI Berlin</option>
|
|
||||||
<option value="LDA BB">LDA Brandenburg</option>
|
|
||||||
<option value="LfDI HB">LfDI Bremen</option>
|
|
||||||
<option value="HmbBfDI">HmbBfDI Hamburg</option>
|
|
||||||
<option value="HBDI">HBDI Hessen</option>
|
|
||||||
<option value="LfDI MV">LfDI Mecklenburg-Vorpommern</option>
|
|
||||||
<option value="LfD NI">LfD Niedersachsen</option>
|
|
||||||
<option value="LDI NRW">LDI NRW</option>
|
|
||||||
<option value="LfDI RP">LfDI Rheinland-Pfalz</option>
|
|
||||||
<option value="UDZ SL">UDZ Saarland</option>
|
|
||||||
<option value="SächsDSB">Sächsischer DSB</option>
|
|
||||||
<option value="LfD LSA">LfD Sachsen-Anhalt</option>
|
|
||||||
<option value="ULD SH">ULD Schleswig-Holstein</option>
|
|
||||||
<option value="TLfDI">TLfDI Thüringen</option>
|
|
||||||
<option value="BfDI">BfDI (Bund)</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className="grid grid-cols-1 sm:grid-cols-3 gap-3">
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-2">Prüfzyklus (Monate)</label>
|
{entry.certId === 'other' && (
|
||||||
<select
|
<input
|
||||||
value={(data as any).reviewCycleMonths || 12}
|
type="text"
|
||||||
onChange={e => onChange({ reviewCycleMonths: parseInt(e.target.value) })}
|
value={entry.customName || ''}
|
||||||
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
onChange={e => updateExistingCert(entry.certId, { customName: e.target.value })}
|
||||||
|
placeholder="Name der Zertifizierung"
|
||||||
|
className="px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
value={entry.certifier || ''}
|
||||||
|
onChange={e => updateExistingCert(entry.certId, { certifier: e.target.value })}
|
||||||
|
placeholder="Zertifizierer (z.B. TÜV, DEKRA)"
|
||||||
|
className="px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
type="date"
|
||||||
|
value={entry.lastDate || ''}
|
||||||
|
onChange={e => updateExistingCert(entry.certId, { lastDate: e.target.value })}
|
||||||
|
title="Datum der letzten Zertifizierung"
|
||||||
|
className="px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Angestrebte Zertifizierungen */}
|
||||||
|
<div className="border-t border-gray-200 pt-6">
|
||||||
|
<h3 className="text-sm font-medium text-gray-700 mb-1">Streben Sie eine Zertifizierung an?</h3>
|
||||||
|
<p className="text-sm text-gray-500 mb-3">Welche Zertifizierungen planen Sie? Mehrfachauswahl moeglich.</p>
|
||||||
|
<div className="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
||||||
|
{CERTIFICATIONS.map(cert => {
|
||||||
|
const selected = targetCerts.includes(cert.id)
|
||||||
|
// Bereits bestehende Zertifizierungen ausgrauen
|
||||||
|
const alreadyHas = existingCerts.some((c: CertificationEntry) => c.certId === cert.id)
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
key={cert.id}
|
||||||
|
type="button"
|
||||||
|
onClick={() => !alreadyHas && toggleTargetCert(cert.id)}
|
||||||
|
disabled={alreadyHas}
|
||||||
|
className={`p-3 rounded-lg border-2 text-left transition-all ${
|
||||||
|
alreadyHas
|
||||||
|
? 'border-gray-100 bg-gray-50 text-gray-400 cursor-not-allowed'
|
||||||
|
: selected
|
||||||
|
? 'border-green-500 bg-green-50 text-green-700'
|
||||||
|
: 'border-gray-200 hover:border-green-300 text-gray-700'
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
<option value={3}>Vierteljährlich (3 Monate)</option>
|
<div className="font-medium text-sm">{cert.label}</div>
|
||||||
<option value={6}>Halbjährlich (6 Monate)</option>
|
{alreadyHas && <div className="text-xs mt-0.5">Bereits vorhanden</div>}
|
||||||
<option value={12}>Jährlich (12 Monate)</option>
|
{!alreadyHas && <div className="text-xs text-gray-500 mt-0.5">{cert.desc}</div>}
|
||||||
<option value={24}>Zweijährlich (24 Monate)</option>
|
</button>
|
||||||
</select>
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
{targetCerts.includes('other') && (
|
||||||
|
<div className="mt-3">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
value={targetCertOther}
|
||||||
|
onChange={e => onChange({ targetCertificationOther: e.target.value })}
|
||||||
|
placeholder="Name der angestrebten Zertifizierung"
|
||||||
|
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Pruefzyklus */}
|
||||||
|
<div className="border-t border-gray-200 pt-6">
|
||||||
|
<label className="block text-sm font-medium text-gray-700 mb-2">Gewuenschter Pruefzyklus</label>
|
||||||
|
<div className="grid grid-cols-2 sm:grid-cols-4 gap-3">
|
||||||
|
{[
|
||||||
|
{ value: 3, label: 'Vierteljaehrlich', desc: '3 Monate' },
|
||||||
|
{ value: 6, label: 'Halbjaehrlich', desc: '6 Monate' },
|
||||||
|
{ value: 12, label: 'Jaehrlich', desc: '12 Monate' },
|
||||||
|
{ value: 24, label: 'Zweijaehrlich', desc: '24 Monate' },
|
||||||
|
].map(opt => {
|
||||||
|
const selected = ((data as any).reviewCycleMonths || 12) === opt.value
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
key={opt.value}
|
||||||
|
type="button"
|
||||||
|
onClick={() => onChange({ reviewCycleMonths: opt.value })}
|
||||||
|
className={`p-3 rounded-lg border-2 text-center transition-all ${
|
||||||
|
selected
|
||||||
|
? 'border-purple-500 bg-purple-50 text-purple-700 font-medium'
|
||||||
|
: 'border-gray-200 hover:border-purple-300 text-gray-700'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<div className="text-sm font-medium">{opt.label}</div>
|
||||||
|
<div className="text-xs text-gray-500">{opt.desc}</div>
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -2269,7 +2437,8 @@ export default function CompanyProfilePage() {
|
|||||||
const [formData, setFormData] = useState<Partial<CompanyProfile>>({
|
const [formData, setFormData] = useState<Partial<CompanyProfile>>({
|
||||||
companyName: '',
|
companyName: '',
|
||||||
legalForm: undefined,
|
legalForm: undefined,
|
||||||
industry: '',
|
industry: [],
|
||||||
|
industryOther: '',
|
||||||
foundedYear: null,
|
foundedYear: null,
|
||||||
businessModel: undefined,
|
businessModel: undefined,
|
||||||
offerings: [],
|
offerings: [],
|
||||||
@@ -2297,8 +2466,8 @@ export default function CompanyProfilePage() {
|
|||||||
completedAt: null,
|
completedAt: null,
|
||||||
})
|
})
|
||||||
|
|
||||||
const showMachineBuilderStep = isMachineBuilderIndustry(formData.industry || '')
|
const showMachineBuilderStep = isMachineBuilderIndustry(formData.industry || [])
|
||||||
const wizardSteps = getWizardSteps(formData.industry || '')
|
const wizardSteps = getWizardSteps(formData.industry || [])
|
||||||
const totalSteps = wizardSteps.length
|
const totalSteps = wizardSteps.length
|
||||||
const lastStep = wizardSteps[wizardSteps.length - 1].id
|
const lastStep = wizardSteps[wizardSteps.length - 1].id
|
||||||
|
|
||||||
@@ -2325,7 +2494,8 @@ export default function CompanyProfilePage() {
|
|||||||
const backendProfile: Partial<CompanyProfile> = {
|
const backendProfile: Partial<CompanyProfile> = {
|
||||||
companyName: data.company_name || '',
|
companyName: data.company_name || '',
|
||||||
legalForm: data.legal_form || undefined,
|
legalForm: data.legal_form || undefined,
|
||||||
industry: data.industry || '',
|
industry: Array.isArray(data.industry) ? data.industry : (data.industry ? [data.industry] : []),
|
||||||
|
industryOther: data.industry_other || '',
|
||||||
foundedYear: data.founded_year || undefined,
|
foundedYear: data.founded_year || undefined,
|
||||||
businessModel: data.business_model || undefined,
|
businessModel: data.business_model || undefined,
|
||||||
offerings: data.offerings || [],
|
offerings: data.offerings || [],
|
||||||
@@ -2352,10 +2522,9 @@ export default function CompanyProfilePage() {
|
|||||||
processingSystems: data.processing_systems || [],
|
processingSystems: data.processing_systems || [],
|
||||||
aiSystems: data.ai_systems || [],
|
aiSystems: data.ai_systems || [],
|
||||||
technicalContacts: data.technical_contacts || [],
|
technicalContacts: data.technical_contacts || [],
|
||||||
subjectToNis2: data.subject_to_nis2 || false,
|
existingCertifications: data.existing_certifications || [],
|
||||||
subjectToAiAct: data.subject_to_ai_act || false,
|
targetCertifications: data.target_certifications || [],
|
||||||
subjectToIso27001: data.subject_to_iso27001 || false,
|
targetCertificationOther: data.target_certification_other || '',
|
||||||
supervisoryAuthority: data.supervisory_authority || '',
|
|
||||||
reviewCycleMonths: data.review_cycle_months || 12,
|
reviewCycleMonths: data.review_cycle_months || 12,
|
||||||
repos: data.repos || [],
|
repos: data.repos || [],
|
||||||
documentSources: data.document_sources || [],
|
documentSources: data.document_sources || [],
|
||||||
@@ -2395,7 +2564,8 @@ export default function CompanyProfilePage() {
|
|||||||
project_id: projectId || null,
|
project_id: projectId || null,
|
||||||
company_name: formData.companyName || '',
|
company_name: formData.companyName || '',
|
||||||
legal_form: formData.legalForm || 'GmbH',
|
legal_form: formData.legalForm || 'GmbH',
|
||||||
industry: formData.industry || '',
|
industry: formData.industry || [],
|
||||||
|
industry_other: formData.industryOther || '',
|
||||||
founded_year: formData.foundedYear || null,
|
founded_year: formData.foundedYear || null,
|
||||||
business_model: formData.businessModel || 'B2B',
|
business_model: formData.businessModel || 'B2B',
|
||||||
offerings: formData.offerings || [],
|
offerings: formData.offerings || [],
|
||||||
@@ -2422,10 +2592,9 @@ export default function CompanyProfilePage() {
|
|||||||
processing_systems: (formData as any).processingSystems || [],
|
processing_systems: (formData as any).processingSystems || [],
|
||||||
ai_systems: (formData as any).aiSystems || [],
|
ai_systems: (formData as any).aiSystems || [],
|
||||||
technical_contacts: (formData as any).technicalContacts || [],
|
technical_contacts: (formData as any).technicalContacts || [],
|
||||||
subject_to_nis2: (formData as any).subjectToNis2 || false,
|
existing_certifications: (formData as any).existingCertifications || [],
|
||||||
subject_to_ai_act: (formData as any).subjectToAiAct || false,
|
target_certifications: (formData as any).targetCertifications || [],
|
||||||
subject_to_iso27001: (formData as any).subjectToIso27001 || false,
|
target_certification_other: (formData as any).targetCertificationOther || '',
|
||||||
supervisory_authority: (formData as any).supervisoryAuthority || '',
|
|
||||||
review_cycle_months: (formData as any).reviewCycleMonths || 12,
|
review_cycle_months: (formData as any).reviewCycleMonths || 12,
|
||||||
repos: (formData as any).repos || [],
|
repos: (formData as any).repos || [],
|
||||||
document_sources: (formData as any).documentSources || [],
|
document_sources: (formData as any).documentSources || [],
|
||||||
@@ -2542,7 +2711,8 @@ export default function CompanyProfilePage() {
|
|||||||
setFormData({
|
setFormData({
|
||||||
companyName: '',
|
companyName: '',
|
||||||
legalForm: undefined,
|
legalForm: undefined,
|
||||||
industry: '',
|
industry: [],
|
||||||
|
industryOther: '',
|
||||||
foundedYear: null,
|
foundedYear: null,
|
||||||
businessModel: undefined,
|
businessModel: undefined,
|
||||||
offerings: [],
|
offerings: [],
|
||||||
|
|||||||
@@ -702,10 +702,10 @@ export function getAutoFilledScoringAnswers(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// industry -> org_industry
|
// industry -> org_industry
|
||||||
if (profile.industry) {
|
if (profile.industry && profile.industry.length > 0) {
|
||||||
answers.push({
|
answers.push({
|
||||||
questionId: 'org_industry',
|
questionId: 'org_industry',
|
||||||
value: profile.industry,
|
value: profile.industry.join(', '),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ export function getProfileInfoForBlock(
|
|||||||
const items: { label: string; value: string }[] = []
|
const items: { label: string; value: string }[] = []
|
||||||
|
|
||||||
if (blockId === 'organisation') {
|
if (blockId === 'organisation') {
|
||||||
if (profile.industry) items.push({ label: 'Branche', value: profile.industry })
|
if (profile.industry && profile.industry.length > 0) items.push({ label: 'Branche', value: profile.industry.join(', ') })
|
||||||
if (profile.employeeCount) items.push({ label: 'Mitarbeiter', value: profile.employeeCount })
|
if (profile.employeeCount) items.push({ label: 'Mitarbeiter', value: profile.employeeCount })
|
||||||
if (profile.annualRevenue) items.push({ label: 'Umsatz', value: profile.annualRevenue })
|
if (profile.annualRevenue) items.push({ label: 'Umsatz', value: profile.annualRevenue })
|
||||||
if (profile.businessModel) items.push({ label: 'Geschäftsmodell', value: profile.businessModel })
|
if (profile.businessModel) items.push({ label: 'Geschäftsmodell', value: profile.businessModel })
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ export function generateDemoState(tenantId: string, userId: string): Partial<SDK
|
|||||||
companyProfile: {
|
companyProfile: {
|
||||||
companyName: 'TechStart GmbH',
|
companyName: 'TechStart GmbH',
|
||||||
legalForm: 'gmbh',
|
legalForm: 'gmbh',
|
||||||
industry: 'Technologie / IT',
|
industry: ['Technologie / IT'],
|
||||||
|
industryOther: '',
|
||||||
foundedYear: 2022,
|
foundedYear: 2022,
|
||||||
businessModel: 'B2B_B2C',
|
businessModel: 'B2B_B2C',
|
||||||
offerings: ['app_web', 'software_saas', 'services_consulting'],
|
offerings: ['app_web', 'software_saas', 'services_consulting'],
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function buildAllowedFactsFromDraftContext(
|
|||||||
return {
|
return {
|
||||||
companyName: profile.name || 'Unbekannt',
|
companyName: profile.name || 'Unbekannt',
|
||||||
legalForm: '', // Nicht im DraftContext enthalten
|
legalForm: '', // Nicht im DraftContext enthalten
|
||||||
industry: profile.industry || '',
|
industry: Array.isArray(profile.industry) ? profile.industry.join(', ') : (profile.industry || ''),
|
||||||
location: '', // Nicht im DraftContext enthalten
|
location: '', // Nicht im DraftContext enthalten
|
||||||
employeeCount: profile.employeeCount || 0,
|
employeeCount: profile.employeeCount || 0,
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export function buildAllowedFacts(
|
|||||||
return {
|
return {
|
||||||
companyName: profile?.companyName ?? 'Unbekannt',
|
companyName: profile?.companyName ?? 'Unbekannt',
|
||||||
legalForm: profile?.legalForm ?? '',
|
legalForm: profile?.legalForm ?? '',
|
||||||
industry: profile?.industry ?? '',
|
industry: Array.isArray(profile?.industry) ? profile.industry.join(', ') : (profile?.industry ?? ''),
|
||||||
location: profile?.headquartersCity ?? '',
|
location: profile?.headquartersCity ?? '',
|
||||||
employeeCount: parseEmployeeCount(profile?.employeeCount),
|
employeeCount: parseEmployeeCount(profile?.employeeCount),
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ KONTROLLE:
|
|||||||
- Typ: ${control.type}
|
- Typ: ${control.type}
|
||||||
|
|
||||||
UNTERNEHMENSPROFIL:
|
UNTERNEHMENSPROFIL:
|
||||||
- Branche: ${companyProfile.industry}
|
- Branche: ${Array.isArray(companyProfile.industry) ? companyProfile.industry.join(', ') : companyProfile.industry}
|
||||||
- Größe: ${companyProfile.size}
|
- Größe: ${companyProfile.size}
|
||||||
- Rolle: ${companyProfile.role}
|
- Rolle: ${companyProfile.role}
|
||||||
- Produkte/Services: ${companyProfile.products.join(', ')}
|
- Produkte/Services: ${companyProfile.products.join(', ')}
|
||||||
@@ -177,7 +177,7 @@ CONTROL:
|
|||||||
- Type: ${control.type}
|
- Type: ${control.type}
|
||||||
|
|
||||||
COMPANY PROFILE:
|
COMPANY PROFILE:
|
||||||
- Industry: ${companyProfile.industry}
|
- Industry: ${Array.isArray(companyProfile.industry) ? companyProfile.industry.join(', ') : companyProfile.industry}
|
||||||
- Size: ${companyProfile.size}
|
- Size: ${companyProfile.size}
|
||||||
- Role: ${companyProfile.role}
|
- Role: ${companyProfile.role}
|
||||||
- Products/Services: ${companyProfile.products.join(', ')}
|
- Products/Services: ${companyProfile.products.join(', ')}
|
||||||
@@ -240,7 +240,7 @@ export function getGapRecommendationsPrompt(
|
|||||||
return `Du bist ein Experte für Datenschutz-Compliance und erstellst Handlungsempfehlungen für TOM-Lücken.
|
return `Du bist ein Experte für Datenschutz-Compliance und erstellst Handlungsempfehlungen für TOM-Lücken.
|
||||||
|
|
||||||
UNTERNEHMEN:
|
UNTERNEHMEN:
|
||||||
- Branche: ${companyProfile.industry}
|
- Branche: ${Array.isArray(companyProfile.industry) ? companyProfile.industry.join(', ') : companyProfile.industry}
|
||||||
- Größe: ${companyProfile.size}
|
- Größe: ${companyProfile.size}
|
||||||
- Rolle: ${companyProfile.role}
|
- Rolle: ${companyProfile.role}
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ Antworte im JSON-Format:
|
|||||||
return `You are a data protection compliance expert creating recommendations for TOM gaps.
|
return `You are a data protection compliance expert creating recommendations for TOM gaps.
|
||||||
|
|
||||||
COMPANY:
|
COMPANY:
|
||||||
- Industry: ${companyProfile.industry}
|
- Industry: ${Array.isArray(companyProfile.industry) ? companyProfile.industry.join(', ') : companyProfile.industry}
|
||||||
- Size: ${companyProfile.size}
|
- Size: ${companyProfile.size}
|
||||||
- Role: ${companyProfile.role}
|
- Role: ${companyProfile.role}
|
||||||
|
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ export function generateDOCXContent(
|
|||||||
elements.push({
|
elements.push({
|
||||||
type: 'paragraph',
|
type: 'paragraph',
|
||||||
content: opts.language === 'de'
|
content: opts.language === 'de'
|
||||||
? `Branche: ${state.companyProfile.industry}`
|
? `Branche: ${Array.isArray(state.companyProfile.industry) ? state.companyProfile.industry.join(', ') : state.companyProfile.industry}`
|
||||||
: `Industry: ${state.companyProfile.industry}`,
|
: `Industry: ${Array.isArray(state.companyProfile.industry) ? state.companyProfile.industry.join(', ') : state.companyProfile.industry}`,
|
||||||
})
|
})
|
||||||
|
|
||||||
elements.push({
|
elements.push({
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export function generatePDFContent(
|
|||||||
|
|
||||||
sections.push({
|
sections.push({
|
||||||
type: 'paragraph',
|
type: 'paragraph',
|
||||||
content: `${opts.language === 'de' ? 'Branche' : 'Industry'}: ${state.companyProfile.industry}`,
|
content: `${opts.language === 'de' ? 'Branche' : 'Industry'}: ${Array.isArray(state.companyProfile.industry) ? state.companyProfile.industry.join(', ') : state.companyProfile.industry}`,
|
||||||
style: { align: 'center' },
|
style: { align: 'center' },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,8 @@ export interface CompanyProfile {
|
|||||||
// Basic Info
|
// Basic Info
|
||||||
companyName: string
|
companyName: string
|
||||||
legalForm: LegalForm
|
legalForm: LegalForm
|
||||||
industry: string // Free text or NACE code
|
industry: string[] // Multi-select industries
|
||||||
|
industryOther: string // Custom text when "Sonstige" selected
|
||||||
foundedYear: number | null
|
foundedYear: number | null
|
||||||
|
|
||||||
// Business Model
|
// Business Model
|
||||||
|
|||||||
Reference in New Issue
Block a user