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:
@@ -702,10 +702,10 @@ export function getAutoFilledScoringAnswers(
|
||||
}
|
||||
|
||||
// industry -> org_industry
|
||||
if (profile.industry) {
|
||||
if (profile.industry && profile.industry.length > 0) {
|
||||
answers.push({
|
||||
questionId: 'org_industry',
|
||||
value: profile.industry,
|
||||
value: profile.industry.join(', '),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -738,7 +738,7 @@ export function getProfileInfoForBlock(
|
||||
const items: { label: string; value: string }[] = []
|
||||
|
||||
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.annualRevenue) items.push({ label: 'Umsatz', value: profile.annualRevenue })
|
||||
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: {
|
||||
companyName: 'TechStart GmbH',
|
||||
legalForm: 'gmbh',
|
||||
industry: 'Technologie / IT',
|
||||
industry: ['Technologie / IT'],
|
||||
industryOther: '',
|
||||
foundedYear: 2022,
|
||||
businessModel: 'B2B_B2C',
|
||||
offerings: ['app_web', 'software_saas', 'services_consulting'],
|
||||
|
||||
@@ -34,7 +34,7 @@ export function buildAllowedFactsFromDraftContext(
|
||||
return {
|
||||
companyName: profile.name || 'Unbekannt',
|
||||
legalForm: '', // Nicht im DraftContext enthalten
|
||||
industry: profile.industry || '',
|
||||
industry: Array.isArray(profile.industry) ? profile.industry.join(', ') : (profile.industry || ''),
|
||||
location: '', // Nicht im DraftContext enthalten
|
||||
employeeCount: profile.employeeCount || 0,
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ export function buildAllowedFacts(
|
||||
return {
|
||||
companyName: profile?.companyName ?? 'Unbekannt',
|
||||
legalForm: profile?.legalForm ?? '',
|
||||
industry: profile?.industry ?? '',
|
||||
industry: Array.isArray(profile?.industry) ? profile.industry.join(', ') : (profile?.industry ?? ''),
|
||||
location: profile?.headquartersCity ?? '',
|
||||
employeeCount: parseEmployeeCount(profile?.employeeCount),
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ KONTROLLE:
|
||||
- Typ: ${control.type}
|
||||
|
||||
UNTERNEHMENSPROFIL:
|
||||
- Branche: ${companyProfile.industry}
|
||||
- Branche: ${Array.isArray(companyProfile.industry) ? companyProfile.industry.join(', ') : companyProfile.industry}
|
||||
- Größe: ${companyProfile.size}
|
||||
- Rolle: ${companyProfile.role}
|
||||
- Produkte/Services: ${companyProfile.products.join(', ')}
|
||||
@@ -177,7 +177,7 @@ CONTROL:
|
||||
- Type: ${control.type}
|
||||
|
||||
COMPANY PROFILE:
|
||||
- Industry: ${companyProfile.industry}
|
||||
- Industry: ${Array.isArray(companyProfile.industry) ? companyProfile.industry.join(', ') : companyProfile.industry}
|
||||
- Size: ${companyProfile.size}
|
||||
- Role: ${companyProfile.role}
|
||||
- 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.
|
||||
|
||||
UNTERNEHMEN:
|
||||
- Branche: ${companyProfile.industry}
|
||||
- Branche: ${Array.isArray(companyProfile.industry) ? companyProfile.industry.join(', ') : companyProfile.industry}
|
||||
- Größe: ${companyProfile.size}
|
||||
- Rolle: ${companyProfile.role}
|
||||
|
||||
@@ -279,7 +279,7 @@ Antworte im JSON-Format:
|
||||
return `You are a data protection compliance expert creating recommendations for TOM gaps.
|
||||
|
||||
COMPANY:
|
||||
- Industry: ${companyProfile.industry}
|
||||
- Industry: ${Array.isArray(companyProfile.industry) ? companyProfile.industry.join(', ') : companyProfile.industry}
|
||||
- Size: ${companyProfile.size}
|
||||
- Role: ${companyProfile.role}
|
||||
|
||||
|
||||
@@ -95,8 +95,8 @@ export function generateDOCXContent(
|
||||
elements.push({
|
||||
type: 'paragraph',
|
||||
content: opts.language === 'de'
|
||||
? `Branche: ${state.companyProfile.industry}`
|
||||
: `Industry: ${state.companyProfile.industry}`,
|
||||
? `Branche: ${Array.isArray(state.companyProfile.industry) ? state.companyProfile.industry.join(', ') : state.companyProfile.industry}`
|
||||
: `Industry: ${Array.isArray(state.companyProfile.industry) ? state.companyProfile.industry.join(', ') : state.companyProfile.industry}`,
|
||||
})
|
||||
|
||||
elements.push({
|
||||
|
||||
@@ -93,7 +93,7 @@ export function generatePDFContent(
|
||||
|
||||
sections.push({
|
||||
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' },
|
||||
})
|
||||
|
||||
|
||||
@@ -164,7 +164,8 @@ export interface CompanyProfile {
|
||||
// Basic Info
|
||||
companyName: string
|
||||
legalForm: LegalForm
|
||||
industry: string // Free text or NACE code
|
||||
industry: string[] // Multi-select industries
|
||||
industryOther: string // Custom text when "Sonstige" selected
|
||||
foundedYear: number | null
|
||||
|
||||
// Business Model
|
||||
|
||||
Reference in New Issue
Block a user