Extract TabNavigation, StatCard, RequestCard, FilterBar, DSRCreateModal, DSRDetailPanel, DSRHeaderActions, and banner components (LoadingSpinner, SettingsTab, OverdueAlert, DeadlineInfoBox, EmptyState) into _components/ so page.tsx drops from 1019 to 247 LOC (under the 300 soft target). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
'use client'
|
|
|
|
export function DSRHeaderActions({
|
|
onOpenCreate,
|
|
}: {
|
|
onOpenCreate: () => void
|
|
}) {
|
|
return (
|
|
<div className="flex items-center gap-2">
|
|
<button
|
|
onClick={() => {
|
|
const link = document.createElement('a')
|
|
link.href = '/api/sdk/v1/compliance/dsr/export?format=csv'
|
|
link.download = 'dsr_export.csv'
|
|
link.click()
|
|
}}
|
|
className="flex items-center gap-2 px-4 py-2 text-gray-600 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors"
|
|
>
|
|
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
|
|
</svg>
|
|
CSV Export
|
|
</button>
|
|
<button
|
|
onClick={onOpenCreate}
|
|
className="flex items-center gap-2 px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors"
|
|
>
|
|
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
|
|
</svg>
|
|
Anfrage erfassen
|
|
</button>
|
|
</div>
|
|
)
|
|
}
|