fix(backend): SQLAlchemy text() fuer alle raw SQL + UI-Verbesserungen
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Failing after 32s
CI / test-python-backend-compliance (push) Successful in 39s
CI / test-python-document-crawler (push) Successful in 23s
CI / test-python-dsms-gateway (push) Successful in 18s

- CRITICAL: Alle db.execute() Aufrufe in company_profile_routes.py
  und generation_routes.py mit text() gewrapped (SQLAlchemy 2.x)
- Geschaeftsmodell-Kacheln: Nur Kurztext, Beschreibung bei Klick
- "Warum diese Fragen" in Hauptbereich unter Ueberschrift verschoben
- Sidebar-Box entfernt fuer mehr Platz

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-08 22:53:29 +01:00
parent 2abf0b4cac
commit 53ff0722a4
4 changed files with 31 additions and 49 deletions

View File

@@ -237,8 +237,8 @@ function StepBusinessModel({
<label className="block text-sm font-medium text-gray-700 mb-4">
Geschäftsmodell <span className="text-red-500">*</span>
</label>
<div className="grid grid-cols-2 sm:grid-cols-4 gap-4">
{Object.entries(BUSINESS_MODEL_LABELS).map(([value, label]) => (
<div className="grid grid-cols-4 gap-4">
{Object.entries(BUSINESS_MODEL_LABELS).map(([value, { short }]) => (
<button
key={value}
type="button"
@@ -249,13 +249,15 @@ function StepBusinessModel({
: 'border-gray-200 hover:border-purple-300'
}`}
>
<div className="text-2xl mb-2">
{value === 'B2B' ? '🏢' : value === 'B2C' ? '👥' : value === 'B2B2C' ? '🏢🔗👥' : '🏢👥'}
</div>
<div className="font-medium text-sm">{label}</div>
<div className="font-semibold">{short}</div>
</button>
))}
</div>
{data.businessModel && (
<p className="text-sm text-gray-500 mt-2">
{BUSINESS_MODEL_LABELS[data.businessModel].description}
</p>
)}
</div>
<div>
@@ -1706,6 +1708,9 @@ export default function CompanyProfilePage() {
{(wizardSteps.find(s => s.id === currentStep) || wizardSteps[0]).name}
</h2>
<p className="text-gray-500">{(wizardSteps.find(s => s.id === currentStep) || wizardSteps[0]).description}</p>
{STEP_EXPLANATIONS[currentStep] && (
<p className="text-sm text-blue-600 mt-2">{STEP_EXPLANATIONS[currentStep]}</p>
)}
</div>
{currentStep === 1 && <StepBasicInfo data={formData} onChange={updateFormData} />}
@@ -1779,33 +1784,9 @@ export default function CompanyProfilePage() {
{/* Sidebar */}
<div className="lg:col-span-1">
{/* Step-specific explanation */}
<div className="bg-blue-50 rounded-xl border border-blue-200 p-6">
<div className="flex items-start gap-3">
<svg
className="w-5 h-5 text-blue-600 mt-0.5 flex-shrink-0"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<div>
<div className="font-medium text-blue-800">Warum diese Fragen?</div>
<div className="text-sm text-blue-700 mt-1">
{STEP_EXPLANATIONS[currentStep] || 'Diese Informationen helfen uns, die für Ihr Unternehmen relevanten Regulierungen zu identifizieren.'}
</div>
</div>
</div>
</div>
{/* Generate Documents CTA */}
{formData.isComplete && (
<div className="mt-6 bg-gradient-to-br from-purple-50 to-indigo-50 rounded-xl border border-purple-200 p-6">
<div className="bg-gradient-to-br from-purple-50 to-indigo-50 rounded-xl border border-purple-200 p-6">
<h3 className="font-semibold text-purple-900 mb-2">Dokumente generieren</h3>
<p className="text-sm text-purple-700 mb-4">
Basierend auf Ihrem Profil können DSFA, VVT, TOM, Löschfristen und Pflichten automatisch als Entwürfe generiert werden.

View File

@@ -201,11 +201,11 @@ export const COMPANY_SIZE_LABELS: Record<CompanySize, string> = {
enterprise: 'Konzern (1000+ MA)',
}
export const BUSINESS_MODEL_LABELS: Record<BusinessModel, string> = {
B2B: 'B2B (Geschäftskunden)',
B2C: 'B2C (Privatkunden)',
B2B_B2C: 'B2B und B2C',
B2B2C: 'B2B2C (über Partner an Endkunden)',
export const BUSINESS_MODEL_LABELS: Record<BusinessModel, { short: string; description: string }> = {
B2B: { short: 'B2B', description: 'Verkauf an Geschäftskunden' },
B2C: { short: 'B2C', description: 'Verkauf an Privatkunden' },
B2B_B2C: { short: 'B2B + B2C', description: 'Verkauf an Geschäfts- und Privatkunden' },
B2B2C: { short: 'B2B2C', description: 'Über Partner an Endkunden (z.B. Plattform, White-Label)' },
}
export const OFFERING_TYPE_LABELS: Record<OfferingType, { label: string; description: string }> = {