feat: Package 4 Phase 2 — Frontend-Fixes und Backend-Endpoints vervollständigt
All checks were successful
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) Successful in 33s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 17s
All checks were successful
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) Successful in 33s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 17s
- document-generator: STEP_EXPLANATIONS Key 'consent' → 'document-generator'
- Proxy: Content-Type nicht mehr hardcoded; forwarded vom Client (Fix für DOCX-Upload + multipart/arrayBuffer)
- Backend: GET /documents/{id}, DELETE /documents/{id}, GET /versions/{id} ergänzt
- Backend-Tests: 4 neue Tests für die neuen Endpoints
- consent/page.tsx: Create-Modal + handleCreateDocument() + DELETE-Handler verdrahtet
- einwilligungen/page.tsx: odentifier→identifier, ip_address, user_agent, history aus API gemappt; source nullable
- cookie-banner/page.tsx: handleExportCode() + Toast für 'Code exportieren' Button
- workflow/page.tsx: 'Neues Dokument' Button + createDocument() + Modal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -123,7 +123,7 @@ interface ConsentHistoryEntry {
|
||||
|
||||
interface ConsentRecord {
|
||||
id: string
|
||||
odentifier: string
|
||||
identifier: string
|
||||
email: string
|
||||
firstName?: string
|
||||
lastName?: string
|
||||
@@ -132,7 +132,7 @@ interface ConsentRecord {
|
||||
currentVersion: string
|
||||
grantedAt: Date | null
|
||||
withdrawnAt: Date | null
|
||||
source: string
|
||||
source: string | null
|
||||
ipAddress: string
|
||||
userAgent: string
|
||||
history: ConsentHistoryEntry[]
|
||||
@@ -145,7 +145,7 @@ interface ConsentRecord {
|
||||
const mockRecords: ConsentRecord[] = [
|
||||
{
|
||||
id: 'c-1',
|
||||
odentifier: 'usr-001',
|
||||
identifier: 'usr-001',
|
||||
email: 'max.mustermann@example.de',
|
||||
firstName: 'Max',
|
||||
lastName: 'Mustermann',
|
||||
@@ -194,7 +194,7 @@ const mockRecords: ConsentRecord[] = [
|
||||
},
|
||||
{
|
||||
id: 'c-2',
|
||||
odentifier: 'usr-001',
|
||||
identifier: 'usr-001',
|
||||
email: 'max.mustermann@example.de',
|
||||
firstName: 'Max',
|
||||
lastName: 'Mustermann',
|
||||
@@ -220,7 +220,7 @@ const mockRecords: ConsentRecord[] = [
|
||||
},
|
||||
{
|
||||
id: 'c-3',
|
||||
odentifier: 'usr-002',
|
||||
identifier: 'usr-002',
|
||||
email: 'anna.schmidt@example.de',
|
||||
firstName: 'Anna',
|
||||
lastName: 'Schmidt',
|
||||
@@ -256,7 +256,7 @@ const mockRecords: ConsentRecord[] = [
|
||||
},
|
||||
{
|
||||
id: 'c-4',
|
||||
odentifier: 'usr-003',
|
||||
identifier: 'usr-003',
|
||||
email: 'peter.meier@example.de',
|
||||
firstName: 'Peter',
|
||||
lastName: 'Meier',
|
||||
@@ -305,7 +305,7 @@ const mockRecords: ConsentRecord[] = [
|
||||
},
|
||||
{
|
||||
id: 'c-5',
|
||||
odentifier: 'usr-004',
|
||||
identifier: 'usr-004',
|
||||
email: 'lisa.weber@example.de',
|
||||
firstName: 'Lisa',
|
||||
lastName: 'Weber',
|
||||
@@ -331,7 +331,7 @@ const mockRecords: ConsentRecord[] = [
|
||||
},
|
||||
{
|
||||
id: 'c-6',
|
||||
odentifier: 'usr-005',
|
||||
identifier: 'usr-005',
|
||||
email: 'thomas.klein@example.de',
|
||||
firstName: 'Thomas',
|
||||
lastName: 'Klein',
|
||||
@@ -491,7 +491,7 @@ function ConsentDetailModal({ record, onClose, onRevoke }: ConsentDetailModalPro
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-500">User-ID:</span>
|
||||
<span className="font-mono text-xs bg-gray-200 px-2 py-0.5 rounded">{record.odentifier}</span>
|
||||
<span className="font-mono text-xs bg-gray-200 px-2 py-0.5 rounded">{record.identifier}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -535,7 +535,7 @@ function ConsentDetailModal({ record, onClose, onRevoke }: ConsentDetailModalPro
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-gray-500 mb-1">Quelle</div>
|
||||
<div className="bg-white px-3 py-2 rounded border">{record.source}</div>
|
||||
<div className="bg-white px-3 py-2 rounded border">{record.source ?? '—'}</div>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<div className="text-gray-500 mb-1">User-Agent</div>
|
||||
@@ -683,7 +683,7 @@ function ConsentRecordRow({ record, onShowDetails }: ConsentRecordRowProps) {
|
||||
<tr className="hover:bg-gray-50">
|
||||
<td className="px-6 py-4">
|
||||
<div className="text-sm font-medium text-gray-900">{record.email}</div>
|
||||
<div className="text-xs text-gray-500">{record.odentifier}</div>
|
||||
<div className="text-xs text-gray-500">{record.identifier}</div>
|
||||
</td>
|
||||
<td className="px-6 py-4">
|
||||
<span className={`px-2 py-1 text-xs rounded-full ${typeColors[record.consentType]}`}>
|
||||
@@ -755,19 +755,22 @@ export default function EinwilligungenPage() {
|
||||
revoked_at?: string
|
||||
consent_version?: string
|
||||
source?: string
|
||||
ip_address?: string
|
||||
user_agent?: string
|
||||
history?: ConsentHistoryEntry[]
|
||||
}) => ({
|
||||
id: c.id,
|
||||
odentifier: c.user_id,
|
||||
identifier: c.user_id,
|
||||
email: c.user_id,
|
||||
consentType: (c.data_point_id as ConsentType) || 'privacy',
|
||||
status: (c.revoked_at ? 'withdrawn' : 'granted') as ConsentStatus,
|
||||
currentVersion: c.consent_version || '1.0',
|
||||
grantedAt: c.granted_at ? new Date(c.granted_at) : null,
|
||||
withdrawnAt: c.revoked_at ? new Date(c.revoked_at) : null,
|
||||
source: c.source || 'API',
|
||||
ipAddress: '',
|
||||
userAgent: '',
|
||||
history: [],
|
||||
source: c.source ?? null,
|
||||
ipAddress: c.ip_address ?? '',
|
||||
userAgent: c.user_agent ?? '',
|
||||
history: c.history ?? [],
|
||||
}))
|
||||
setRecords(mapped)
|
||||
}
|
||||
@@ -786,7 +789,7 @@ export default function EinwilligungenPage() {
|
||||
const matchesFilter = filter === 'all' || record.consentType === filter || record.status === filter
|
||||
const matchesSearch = searchQuery === '' ||
|
||||
record.email.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
record.odentifier.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
record.identifier.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
return matchesFilter && matchesSearch
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user